Class Evolution.Hazard
java.lang.Object
Evolution.Drawable
Evolution.Hazard
- Enclosing class:
- Evolution
private class Evolution.Hazard
- extends Evolution.Drawable
Method Summary |
boolean |
affectAnimal(Evolution.Animal a,
double dX,
double dY)
Affect an animal |
void |
die()
|
void |
drawSprite()
Override drawSprite() so we can set the hazard into the background pixels |
int |
getDirection()
|
void |
initialize(java.lang.Double positionX,
java.lang.Double positionY,
Evolution.HazardType type,
java.lang.Double strength,
java.lang.Double direction,
java.lang.Integer range)
Initialize this object's member variables |
void |
setDirection(int direction)
|
java.lang.String |
toString()
|
void |
wipeSprite()
Overload of wipeSprite, using the default pixel arrays. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
type
public Evolution.HazardType type
strength
public double strength
direction
public double direction
range
public int range
Evolution.Hazard
public Evolution.Hazard(Evolution.HazardType type)
- Use all the defaults
initialize
public void initialize(java.lang.Double positionX,
java.lang.Double positionY,
Evolution.HazardType type,
java.lang.Double strength,
java.lang.Double direction,
java.lang.Integer range)
- Initialize this object's member variables
affectAnimal
public boolean affectAnimal(Evolution.Animal a,
double dX,
double dY)
- Affect an animal
drawSprite
public void drawSprite()
- Override drawSprite() so we can set the hazard into the background pixels
- Overrides:
drawSprite
in class Evolution.Drawable
wipeSprite
public void wipeSprite()
- Description copied from class:
Evolution.Drawable
- Overload of wipeSprite, using the default pixel arrays.
- Overrides:
wipeSprite
in class Evolution.Drawable
die
public void die()
- Overrides:
die
in class Evolution.Drawable
getDirection
public int getDirection()
setDirection
public void setDirection(int direction)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object