Back to project page TileArena.
The source code is released under:
MIT License
If you think the Android project TileArena listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package game.tile.arena.util.controller; /* ww w.j a v a 2 s .c o m*/ import com.badlogic.gdx.graphics.g2d.SpriteBatch; import game.tile.arena.util.Position; import game.tile.arena.util.Preferences; public abstract class PlayerController { private static PlayerController playerController; public static PlayerController getInstance() { if (playerController == null) { if (Preferences.get().TOUCH_CONTROLS) playerController = new TouchController(); else playerController = new KeyboardController(); return playerController; } return null; } public abstract Position getMovement(); public abstract Position getAttack(); public void render(SpriteBatch batch, double delta) { } }