mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 19:14:05 +09:00
actor AI from Lua script
Former-commit-id: 184160efc59c4f846f1cc154fe3e60d21b301ee3 Former-commit-id: 4e228542975ea52945a597b7ca1bc06b407c3be7
This commit is contained in:
@@ -45,10 +45,12 @@ object GameController {
|
||||
(Terrarum.ingame.player as Player).vehicleRiding!!.processInput(gc, delta, input)
|
||||
}
|
||||
|
||||
Terrarum.ingame.player.processInput(gc, delta, input)
|
||||
Terrarum.ingame.actorContainer.forEach {
|
||||
if (it is Controllable) it.processInput(gc, delta, input)
|
||||
}
|
||||
|
||||
for (ui in Terrarum.ingame.uiContainer) {
|
||||
ui.processInput(gc, delta, input)
|
||||
Terrarum.ingame.uiContainer.forEach {
|
||||
it.processInput(gc, delta, input)
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -56,31 +58,6 @@ object GameController {
|
||||
}
|
||||
|
||||
|
||||
// test tile remove
|
||||
/*if (input.isMouseButtonDown(Input.MOUSE_LEFT_BUTTON)) {
|
||||
try {
|
||||
Terrarum.ingame.world.setTileTerrain(mouseTileX, mouseTileY, Tile.AIR)
|
||||
// terrarum.game.map.setTileWall(mouseTileX, mouseTileY, Tile.AIR);
|
||||
}
|
||||
catch (e: ArrayIndexOutOfBoundsException) {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
// test tile place
|
||||
else if (input.isMouseButtonDown(Input.MOUSE_RIGHT_BUTTON)) {
|
||||
try {
|
||||
Terrarum.ingame.world.setTileTerrain(
|
||||
mouseTileX, mouseTileY,
|
||||
Terrarum.ingame.player.actorValue.getAsInt("__selectedtile")!!
|
||||
)
|
||||
}
|
||||
catch (e: ArrayIndexOutOfBoundsException) {
|
||||
}
|
||||
|
||||
}*/
|
||||
|
||||
|
||||
///////////////////
|
||||
// MOUSE CONTROL //
|
||||
///////////////////
|
||||
|
||||
Reference in New Issue
Block a user