27 lines
354 B
Java
27 lines
354 B
Java
|
|
package ei.game.scene;
|
||
|
|
|
||
|
|
public abstract class GameEntity{
|
||
|
|
private int life;
|
||
|
|
|
||
|
|
public GameEntity(int l){
|
||
|
|
life = l;
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Returns the life
|
||
|
|
*
|
||
|
|
* @return The life
|
||
|
|
*/
|
||
|
|
public int getLife(){
|
||
|
|
return life;
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Set the life
|
||
|
|
* @param l The life to set to
|
||
|
|
*/
|
||
|
|
public void setLife(int l){
|
||
|
|
life = l;
|
||
|
|
}
|
||
|
|
}
|