mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 20:31:51 +09:00
issue #7 implemented
Former-commit-id: e63de56e81e19c842c519c77019b9750d751851e Former-commit-id: 6b018d6ac3bb471d5997c1eece4485f967f82ded
This commit is contained in:
@@ -80,8 +80,6 @@ constructor() : BasicGameState() {
|
||||
private val useShader: Boolean = false
|
||||
private val shaderProgram = 0
|
||||
|
||||
private val CORES = ThreadPool.POOL_SIZE
|
||||
|
||||
val KEY_LIGHTMAP_RENDER = Key.F7
|
||||
val KEY_LIGHTMAP_SMOOTH = Key.F8
|
||||
|
||||
@@ -94,6 +92,9 @@ constructor() : BasicGameState() {
|
||||
private val UI_INVENTORY_PLAYER = "uiInventoryPlayer"
|
||||
private val UI_INVENTORY_ANON = "uiInventoryAnon"
|
||||
|
||||
val paused: Boolean
|
||||
get() = consoleHandler.isOpened
|
||||
|
||||
@Throws(SlickException::class)
|
||||
override fun init(gameContainer: GameContainer, stateBasedGame: StateBasedGame) {
|
||||
// state init code. Executed before the game goes into any "state" in states in StateBasedGame.java
|
||||
@@ -175,48 +176,51 @@ constructor() : BasicGameState() {
|
||||
setAppTitle()
|
||||
|
||||
|
||||
///////////////////////////
|
||||
// world-related updates //
|
||||
///////////////////////////
|
||||
world.updateWorldTime(delta)
|
||||
WorldSimulator(world, player, delta)
|
||||
WeatherMixer.update(gc, delta)
|
||||
TileStats.update()
|
||||
if (!(CommandDict["setgl"] as SetGlobalLightOverride).lightOverride)
|
||||
world.globalLight = constructRGBFromInt(
|
||||
WeatherMixer.globalLightNow.redByte,
|
||||
WeatherMixer.globalLightNow.greenByte,
|
||||
WeatherMixer.globalLightNow.blueByte
|
||||
)
|
||||
if (!paused) {
|
||||
|
||||
///////////////////////////
|
||||
// world-related updates //
|
||||
///////////////////////////
|
||||
world.updateWorldTime(delta)
|
||||
WorldSimulator(world, player, delta)
|
||||
WeatherMixer.update(gc, delta)
|
||||
TileStats.update()
|
||||
if (!(CommandDict["setgl"] as SetGlobalLightOverride).lightOverride)
|
||||
world.globalLight = constructRGBFromInt(
|
||||
WeatherMixer.globalLightNow.redByte,
|
||||
WeatherMixer.globalLightNow.greenByte,
|
||||
WeatherMixer.globalLightNow.blueByte
|
||||
)
|
||||
|
||||
|
||||
///////////////////////////
|
||||
// input-related updates //
|
||||
///////////////////////////
|
||||
GameController.processInput(gc, delta, gc.input)
|
||||
uiContainer.forEach { it.processInput(gc, delta, gc.input) }
|
||||
///////////////////////////
|
||||
// input-related updates //
|
||||
///////////////////////////
|
||||
GameController.processInput(gc, delta, gc.input)
|
||||
uiContainer.forEach { it.processInput(gc, delta, gc.input) }
|
||||
|
||||
|
||||
////////////////////////////
|
||||
// camera-related updates //
|
||||
////////////////////////////
|
||||
FeaturesDrawer.update(gc, delta)
|
||||
MapCamera.update()
|
||||
TilesDrawer.update()
|
||||
////////////////////////////
|
||||
// camera-related updates //
|
||||
////////////////////////////
|
||||
FeaturesDrawer.update(gc, delta)
|
||||
MapCamera.update()
|
||||
TilesDrawer.update()
|
||||
|
||||
|
||||
///////////////////////////
|
||||
// actor-related updates //
|
||||
///////////////////////////
|
||||
repossessActor()
|
||||
///////////////////////////
|
||||
// actor-related updates //
|
||||
///////////////////////////
|
||||
repossessActor()
|
||||
|
||||
// determine whether the inactive actor should be re-active
|
||||
wakeDormantActors()
|
||||
// determine whether the actor should be active or dormant
|
||||
KillOrKnockdownActors()
|
||||
updateActors(gc, delta)
|
||||
// TODO thread pool(?)
|
||||
CollisionSolver.process()
|
||||
// determine whether the inactive actor should be re-active
|
||||
wakeDormantActors()
|
||||
// determine whether the actor should be active or dormant
|
||||
KillOrKnockdownActors()
|
||||
updateActors(gc, delta)
|
||||
// TODO thread pool(?)
|
||||
CollisionSolver.process()
|
||||
}
|
||||
|
||||
|
||||
////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user