more inlining and minor performance tweaks on LightmapRenderer

This commit is contained in:
minjaesong
2017-06-12 04:04:54 +09:00
parent 2ca8c2c263
commit ded19d3ae7
15 changed files with 171 additions and 220 deletions

View File

@@ -61,7 +61,7 @@ class StateInGame : BasicGameState() {
var playableActorDelegate: PlayableActorDelegate? = null // DO NOT LATEINIT!
private set
val player: ActorHumanoid? // currently POSSESSED actor :)
inline val player: ActorHumanoid? // currently POSSESSED actor :)
get() = playableActorDelegate?.actor
var screenZoom = 1.0f
@@ -106,12 +106,12 @@ class StateInGame : BasicGameState() {
lateinit var uiAlasesPausing: ArrayList<UIHandler>
private set
var paused: Boolean = false
inline val paused: Boolean
get() = uiAlasesPausing.map { if (it.isOpened) return true else 0 }.isEmpty() // isEmply is always false, which we want
/**
* Set to false if UI is opened; set to true if UI is closed.
*/
var canPlayerControl: Boolean = false
inline val canPlayerControl: Boolean
get() = !paused // FIXME temporary behab (block movement if the game is paused or paused by UIs)
@Throws(SlickException::class)