|
OGS Java API Spec | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ogs.support.Object | +--ogs.core.Entity
An object that exists in the game world. The Entity
class is an abstract class that contains attributes and operations
common to all entities.
Field Summary | |
protected int |
currentHealth
|
protected Defense |
defense
|
protected int |
maximumHealth
|
protected Size |
size
|
protected double |
weight
|
Fields inherited from class ogs.support.Object |
listeners |
Constructor Summary | |
protected |
Entity()
Create a new entity. |
Method Summary | |
int |
getCurrentHealth()
Determine the current health (also known as hit points) of this entity. |
Defense |
getDefense()
Determine the current defense rating of this entity. |
int |
getMaximumHealth()
Determine the maximum health of this entity. |
Size |
getSize()
Determine the current size category of this entity. |
double |
getWeight()
Determine the current weight of this entity. |
void |
setCurrentHealth(int health)
Change the current health of this entity. |
void |
setMaximumHealth(int health)
Change the maximum health of this entity. |
void |
setWeight(double weight)
Change the current weight of this entity. |
Methods inherited from class ogs.support.Object |
addListener, handleEvent, notifyListeners, removeListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected double weight
protected Size size
protected Defense defense
protected int currentHealth
protected int maximumHealth
Constructor Detail |
protected Entity()
Method Detail |
public double getWeight()
public void setWeight(double weight)
public Size getSize()
public Defense getDefense()
public int getCurrentHealth()
public void setCurrentHealth(int health)
health
- current healthpublic int getMaximumHealth()
public void setMaximumHealth(int health)
health
- maximum health
|
OGS Java API Spec | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |