Back to project page Layrd.
The source code is released under:
MIT License
If you think the Android project Layrd 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 com.Voltronics.game; //from ww w . j a va2s . c o m public class Player extends GameObject{ public enum state{IDLE, MOVING, DYING}; public state plState = state.IDLE; public Player(float x, float y, float width, float height){ super(Math.max(x/2, x), Math.max(y/2, y), Math.max(1, width), Math.max(1, height)); } public void setPos(float x, float y){ //this.position.x = Math.max(this.rectBounds.x/2, x); //this.position.y = Math.max(this.rectBounds.y/2, y); this.position.x = x; this.position.y = y; sprite.setPosition(x, y); } }