mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 20:31:51 +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) {
|
||||
if (screenToLoad?.gameInitialised ?: false) {
|
||||
doContextChange = true
|
||||
}
|
||||
|
||||
if (doContextChange) {
|
||||
Thread.sleep(80)
|
||||
AppLoader.setScreen(screenToLoad!!)
|
||||
|
||||
@@ -225,7 +225,12 @@ object SanicLoadScreen : LoadScreenBase() {
|
||||
AppLoader.batch.flush()
|
||||
}
|
||||
|
||||
super.render(delta)
|
||||
|
||||
// replaces super.render()
|
||||
if (doContextChange) {
|
||||
Thread.sleep(80)
|
||||
AppLoader.setScreen(screenToLoad!!)
|
||||
}
|
||||
}
|
||||
|
||||
private fun getPulseEffCol(): Color {
|
||||
|
||||
@@ -110,7 +110,9 @@ class WorldgenLoadScreen(screenToBeLoaded: IngameInstance, private val worldwidt
|
||||
}
|
||||
|
||||
override fun dispose() {
|
||||
previewPixmap.dispose()
|
||||
if (!previewPixmap.isDisposed)
|
||||
previewPixmap.dispose()
|
||||
|
||||
previewTexture.dispose()
|
||||
}
|
||||
}
|
||||
@@ -36,7 +36,7 @@ class UIProxyNewBuildingMaker : UICanvas() {
|
||||
|
||||
Terrarum.setCurrentIngameInstance(ingame)
|
||||
SanicLoadScreen.screenToLoad = ingame
|
||||
AppLoader.setScreen(SanicLoadScreen)
|
||||
AppLoader.setLoadScreen(SanicLoadScreen)
|
||||
}
|
||||
|
||||
override fun endClosing(delta: Float) {
|
||||
|
||||
@@ -39,7 +39,7 @@ class UIProxyNewRandomGame : UICanvas() {
|
||||
|
||||
val ingame = TerrarumIngame(AppLoader.batch)
|
||||
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.gameLoadMode = TerrarumIngame.GameLoadMode.CREATE_NEW
|
||||
|
||||
|
||||
Reference in New Issue
Block a user