making gamepad work again

This commit is contained in:
minjaesong
2019-02-08 18:57:47 +09:00
parent 589ac0de95
commit 003fed6cf0
15 changed files with 99 additions and 52 deletions

View File

@@ -1,6 +1,7 @@
package net.torvald.terrarum.modulebasegame
import com.badlogic.gdx.Gdx
import com.badlogic.gdx.controllers.Controllers
import com.badlogic.gdx.graphics.Camera
import com.badlogic.gdx.graphics.g2d.SpriteBatch
import net.torvald.dataclass.CircularArray
@@ -253,7 +254,7 @@ open class Ingame(batch: SpriteBatch) : IngameInstance(batch) {
}
}
private val ingameController = IngameController(this)
val ingameController = IngameController(this)
/** Load rest of the game with GL context */
fun postInit() {
@@ -266,7 +267,9 @@ open class Ingame(batch: SpriteBatch) : IngameInstance(batch) {
// make controls work
Gdx.input.inputProcessor = ingameController
Controllers.addListener(ingameController)