package ei.game.scene; import ei.engine.scene.Entity; import ei.engine.scene.Node; public abstract class GameEntity{ private int life; private boolean selected; public GameEntity(int l){ life = l; this.selected = false; } /** * Returns the life * * @return The life */ public int getLife(){ return life; } /** * If the unit is selected. * @return true if selected. */ public boolean isSelected() { return selected; } /** * Sets a unit to be selected or not. * @param b true or false. */ public void setSelected(boolean b) { this.selected = b; } protected abstract Entity getSelection(); /** * Set the life * @param l The life to set to */ public void setLife(int l){ life = l; } public void move(int x, int y) { } public abstract void update(); public abstract Entity getNode(); }