|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.planeth.gtroids.stats.ObjectStats
Handles all object stats like health, team, etc.
| Constructor Summary | |
ObjectStats()
Constructor for ObjectStats. |
|
| Method Summary | |
int |
getDamagePoints()
Returns the damagePoints (for hitting an another object) |
int |
getHealthPercent()
Returns the percentage of the currentHealthPoints (to the max) |
int |
getPointsForHit()
Returns the pointsForHit. |
int |
getPointsForKill()
Returns the pointsForKill. |
int |
getTeam()
Returns the team |
void |
hitWith(int damagePoints)
Hits the Object with the passed damagePoints |
void |
init(int healthPoints,
int pointsForKill)
Initializes the ObjectStats |
boolean |
isAlive()
Returns true, if the object is alive |
boolean |
isBonus()
Returns true, if the object is a bonus item |
boolean |
isEnemy(ObjectStats otherStats)
Returns true, if the passed object is an enemy |
boolean |
isGodMode()
Returns true, if the object is in godMode. |
boolean |
isNeutral()
Returns true, if the object is neutral (no team) |
boolean |
isPlayer()
Returns true, if the object is a player |
boolean |
isShieldEnabled()
Returns true, if the shield is enabled |
void |
paint(java.awt.Graphics g,
Vector2D pos)
Paints the stats into the passed Graphics |
void |
setHealthToMax()
Sets the healthPoints back to the max (cure) |
void |
setShieldEnabled(boolean shieldEnabled)
If set to true, the immortal shield gets enabled |
void |
setTeam(int team)
Sets the team |
void |
toggleGodMode()
Toggles the godMode (on/off) |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ObjectStats()
| Method Detail |
public void init(int healthPoints,
int pointsForKill)
healthPoints - the initial healthPtspointsForKill - the points, what the player gets, if he kills the object
public void paint(java.awt.Graphics g,
Vector2D pos)
g - Graphics to paint intopos - the position to paint the statspublic int getHealthPercent()
public void setHealthToMax()
public void hitWith(int damagePoints)
damagePoints - the damagePoints to use for the impactpublic boolean isAlive()
public boolean isEnemy(ObjectStats otherStats)
otherStats - object to check with
public boolean isNeutral()
public boolean isPlayer()
public boolean isBonus()
public int getDamagePoints()
public int getTeam()
public void setTeam(int team)
team - The team to set.public int getPointsForHit()
public int getPointsForKill()
public boolean isGodMode()
public void toggleGodMode()
public boolean isShieldEnabled()
public void setShieldEnabled(boolean shieldEnabled)
shieldEnabled - The shieldEnabled to set.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||