mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 02:54:04 +09:00
trying to write a new ingamecontroller so that its update can be manually controlled
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user