trying to write a new ingamecontroller so that its update can be manually controlled

This commit is contained in:
minjaesong
2021-08-21 21:03:39 +09:00
parent bb95444067
commit ca72a6fbe5
14 changed files with 214 additions and 111 deletions

View File

@@ -505,11 +505,6 @@ class BuildingMakerController(val screen: BuildingMaker) : InputAdapter() {
return true
}
override fun mouseMoved(screenX: Int, screenY: Int): Boolean {
screen.uiContainer.forEach { it?.mouseMoved(screenX, screenY) }
return true
}
override fun keyTyped(character: Char): Boolean {
screen.uiContainer.forEach { it?.keyTyped(character) }
return true

View File

@@ -564,6 +564,10 @@ open class TerrarumIngame(batch: SpriteBatch) : IngameInstance(batch) {
particlesActive = 0
// synchronised Ingame Input Updater
ingameController.update(delta)
if (!paused) {
//hypothetical_input_capturing_function_if_you_finally_decided_to_forgo_gdx_input_processor_and_implement_your_own_to_synchronise_everything()
@@ -611,9 +615,6 @@ open class TerrarumIngame(batch: SpriteBatch) : IngameInstance(batch) {
}
// world click events (e.g. opening the UI that a fixture has) must go here
ingameController.update(delta)
/*if (!paused) {
// completely consume block change queues because why not
terrainChangeQueue.clear()

View File

@@ -188,14 +188,6 @@ open class UIRemoCon(treeRepresentation: QNDTreeNode<String>) : UICanvas() {
}
override fun mouseMoved(screenX: Int, screenY: Int): Boolean {
screens.forEach {
it.second.mouseMoved(screenX, screenY) // again, underlying handler will block unnecessary renders
}
return true
}
override fun touchDragged(screenX: Int, screenY: Int, pointer: Int): Boolean {
screens.forEach {
it.second.touchDragged(screenX, screenY, pointer) // again, underlying handler will block unnecessary renders