Commit 731feade authored by Daniel Drießen's avatar Daniel Drießen

Bugfix in Player

parent 65111fb9
......@@ -46,6 +46,7 @@ android {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
buildToolsVersion = '28.0.3'
}
dependencies {
......
......@@ -22,7 +22,7 @@ class GameThread(private val game: GameActivity) : Thread() {
}
private fun computeFrame() {
Log.d("GAME2", "tick")
Log.d("GAME2", "tick" + game.ticks)
val start = System.currentTimeMillis()
game.update()
......
......@@ -94,6 +94,7 @@ class Player(pm: PathManager) : Sprite(pm) {
}
shields.remove(rs)
setPos(pos.x + delta.x, pos.y + delta.y)
if (Constants.InputMethod.TOUCH != Preferences.inputMethod)
setPos(pos.x + delta.x, pos.y + delta.y)
}
}
......@@ -30,11 +30,7 @@ class PathManager(val game: GameActivity) : Serializable {
canvas.rotate(-degreesRotated, game.size.x / 2, game.size.y / 2)
for (path in paths)
if (path is RectPath)
path.draw(canvas, path.getPaint())
for (path in paths)
if (path !is RectPath)
path.draw(canvas, path.getPaint())
path.draw(canvas, path.getPaint())
canvas.rotate(degreesRotated, game.size.x / 2, game.size.y / 2)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment