public class LifeCycle
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) OdorWorldEntity |
parent
Parent entity.
|
Constructor and Description |
---|
LifeCycle(OdorWorldEntity entity) |
Modifier and Type | Method and Description |
---|---|
void |
bite()
Take one step closer to death.
|
int |
getBites() |
int |
getBitesToDie() |
OdorWorldEntity |
getParent() |
double |
getResurrectionProb() |
boolean |
isDead() |
void |
setBites(int bites)
Number of times bitten.
|
void |
setBitesToDie(int bitesToDie) |
void |
setDead(boolean isDead) |
void |
setResurrectionProb(double resurrectionProb) |
void |
update()
Life and death.
|
OdorWorldEntity parent
public LifeCycle(OdorWorldEntity entity)
entity
- public int getBitesToDie()
public void setBitesToDie(int bitesToDie)
bitesToDie
- Bites to eat an item.public double getResurrectionProb()
public void setResurrectionProb(double resurrectionProb)
resurrectionProb
- Likelihood entity will reappear.public int getBites()
public void setBites(int bites)
bites
- Number of bites.public OdorWorldEntity getParent()
public void bite()
public boolean isDead()
public void setDead(boolean isDead)
isDead
- the isDead to setpublic void update()