Back to project page Android-Tile-Based-Game.
The source code is released under:
MIT License
If you think the Android project Android-Tile-Based-Game 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 org.ruscoe.example.tilegame; /*from ww w. jav a 2s. c o m*/ import android.content.Context; /** * An extension of GameUnit, PlayerUnit represents the player-controlled * unit in the game. * * @author Dan Ruscoe (ruscoe.org) * @version 1.0 */ public class PlayerUnit extends GameUnit { public static final int SPEED = 3; Context mContext; private int mUnmodifiedX = 0; private int mUnmodifiedY = 0; public PlayerUnit(Context context, int drawable) { super(context, drawable); this.mContext = context; } public int getUnmodifiedX() { return this.mUnmodifiedX; } public void setUnmodifiedX(int unmodifiedX) { this.mUnmodifiedX = unmodifiedX; } public int getUnmodifiedY() { return this.mUnmodifiedY; } public void setUnmodifiedY(int unmodifiedY) { this.mUnmodifiedY = unmodifiedY; } }