|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.planeth.gtroids.obj.base.PaintableObject
com.planeth.gtroids.obj.base.AbstractGameObject
The abstraction of a base game object
ObjectStats| Constructor Summary | |
AbstractGameObject(Shape baseShape)
Constructor for AbstractGameObject. |
|
| Method Summary | |
void |
cure()
Cures the object Set's the healthPoints to the object's max. |
abstract void |
die()
Initates the dead of the Object without any game relevant changes like updating healthPoints and updating players points |
protected AudioResource |
getAudioResource()
Returns the audioResource |
protected java.awt.Color |
getColorBackup()
Returns the colorBackup The colorBackup is used to cache the color while changing the base color temporary |
ObjectStats |
getStats()
Returns the Stats for the object |
protected TimerManager |
getTimerManager()
Returns the timerManager ot the object |
void |
hitWith(AbstractGameObject gameObject)
Hits this object with the passed AbstractGameObject |
void |
hitWithBomb()
Hits the object with a smart bomb |
void |
initStats(int healthPoints,
int pointsForKill)
Initializes the ObjectStats |
boolean |
isEnemy(AbstractGameObject abstractGameObject)
Returns true, if the passed AbstractGameObject is an enemy of this object |
boolean |
isReadyToDie()
Returns true, if the object is ready to get deleted |
void |
kill()
Kills the Object including all game relevant actions like updating healthPoints and updating players points. |
void |
paint(java.awt.Graphics g)
Paints the object into the passed Graphics |
abstract void |
pause(boolean pauseState)
Pauses/unpauses the object or components of the object, which have to be paused. |
protected void |
setColorBackup(java.awt.Color colorBackup)
Sets the colorBackup The colorBackup is used to cache the color while changing the base color temporary |
protected void |
setColorFixed(boolean colorFixed)
If set to true, the color doesn't change, if the object is hit or damaged by an another object. |
void |
setReadyToDie()
Sets the object ready to get deleted |
abstract void |
update()
Does one update step for the Object |
| Methods inherited from class com.planeth.gtroids.obj.base.PaintableObject |
addShape, explodeBaseShape, getAvgDiameter, getAvgVector, getBaseColor, getBaseVertexes, getBounds, getMaxRadius, getNrOfVertexes, getOrientation, getPos, move, paintAtPos, randomizeBaseShape, rotate, setBaseColor, splitBaseShape |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AbstractGameObject(Shape baseShape)
baseShape - the baseShape of the object| Method Detail |
public abstract void update()
public abstract void pause(boolean pauseState)
pause in interface ITimeControllablepauseState - ITimeControllable.pause(boolean)public abstract void die()
public void cure()
public void hitWith(AbstractGameObject gameObject)
gameObject - the object, which hits this objectpublic void kill()
public void hitWithBomb()
public boolean isEnemy(AbstractGameObject abstractGameObject)
abstractGameObject - the object to check
public void initStats(int healthPoints,
int pointsForKill)
healthPoints - the base (max) healthPoints for the objectpointsForKill - the points which the player gets for a kill of this object (if its an enemy)public void paint(java.awt.Graphics g)
PaintableObject
paint in class PaintableObjectg - Graphics to paint intoPaintableObject.paint(java.awt.Graphics)public ObjectStats getStats()
public boolean isReadyToDie()
public void setReadyToDie()
protected TimerManager getTimerManager()
protected AudioResource getAudioResource()
protected void setColorFixed(boolean colorFixed)
colorFixed - true = the color is fixed, false = the color depends on current healthPoints.protected java.awt.Color getColorBackup()
protected void setColorBackup(java.awt.Color colorBackup)
colorBackup - The colorBackup to set.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||