mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-06 08:38:30 +09:00
worldgenloadscreen now makes transition
This commit is contained in:
@@ -63,6 +63,10 @@ open class LoadScreenBase : ScreenAdapter(), Disposable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun render(delta: Float) {
|
override fun render(delta: Float) {
|
||||||
|
if (screenToLoad?.gameInitialised ?: false) {
|
||||||
|
doContextChange = true
|
||||||
|
}
|
||||||
|
|
||||||
if (doContextChange) {
|
if (doContextChange) {
|
||||||
Thread.sleep(80)
|
Thread.sleep(80)
|
||||||
AppLoader.setScreen(screenToLoad!!)
|
AppLoader.setScreen(screenToLoad!!)
|
||||||
|
|||||||
@@ -225,7 +225,12 @@ object SanicLoadScreen : LoadScreenBase() {
|
|||||||
AppLoader.batch.flush()
|
AppLoader.batch.flush()
|
||||||
}
|
}
|
||||||
|
|
||||||
super.render(delta)
|
|
||||||
|
// replaces super.render()
|
||||||
|
if (doContextChange) {
|
||||||
|
Thread.sleep(80)
|
||||||
|
AppLoader.setScreen(screenToLoad!!)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getPulseEffCol(): Color {
|
private fun getPulseEffCol(): Color {
|
||||||
|
|||||||
@@ -110,7 +110,9 @@ class WorldgenLoadScreen(screenToBeLoaded: IngameInstance, private val worldwidt
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun dispose() {
|
override fun dispose() {
|
||||||
previewPixmap.dispose()
|
if (!previewPixmap.isDisposed)
|
||||||
|
previewPixmap.dispose()
|
||||||
|
|
||||||
previewTexture.dispose()
|
previewTexture.dispose()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -36,7 +36,7 @@ class UIProxyNewBuildingMaker : UICanvas() {
|
|||||||
|
|
||||||
Terrarum.setCurrentIngameInstance(ingame)
|
Terrarum.setCurrentIngameInstance(ingame)
|
||||||
SanicLoadScreen.screenToLoad = ingame
|
SanicLoadScreen.screenToLoad = ingame
|
||||||
AppLoader.setScreen(SanicLoadScreen)
|
AppLoader.setLoadScreen(SanicLoadScreen)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun endClosing(delta: Float) {
|
override fun endClosing(delta: Float) {
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class UIProxyNewRandomGame : UICanvas() {
|
|||||||
|
|
||||||
val ingame = TerrarumIngame(AppLoader.batch)
|
val ingame = TerrarumIngame(AppLoader.batch)
|
||||||
val worldParam = TerrarumIngame.NewWorldParameters(2400, 800, HQRNG().nextLong())
|
val worldParam = TerrarumIngame.NewWorldParameters(2400, 800, HQRNG().nextLong())
|
||||||
//val worldParam = Ingame.NewWorldParameters(8192, 2048, 0x51621DL)
|
//val worldParam = TerrarumIngame.NewWorldParameters(8192, 2048, 0x51621DL)
|
||||||
ingame.gameLoadInfoPayload = worldParam
|
ingame.gameLoadInfoPayload = worldParam
|
||||||
ingame.gameLoadMode = TerrarumIngame.GameLoadMode.CREATE_NEW
|
ingame.gameLoadMode = TerrarumIngame.GameLoadMode.CREATE_NEW
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user