Back to project page AndroidShooter.
The source code is released under:
GNU General Public License
If you think the Android project AndroidShooter 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 jonathan.geoffroy.shooter.model.characters; //from www. ja va 2 s. c o m import jonathan.geoffroy.shooter.model.Map; import com.badlogic.gdx.Gdx; public class Character { private Coord2F position; public Character(int terrainX, int terrainY) { float terrainWidth = Gdx.graphics.getWidth() / Map.NB_TERRAINS_X; float terrainHeight = Gdx.graphics.getHeight() / Map.NB_TERRAINS_Y; position = new Coord2F( terrainX * terrainWidth, terrainY * terrainHeight + Gdx.graphics.getHeight() ); } public Coord2F getPosition() { return position; } public void setPosition(Coord2F position) { this.position = position; } }