|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.brackeen.javagamebook.game.GameObject
com.brackeen.javagamebook.path.PathBot
com.brackeen.javagamebook.ai.AIBot
Field Summary | |
static int |
BATTLE_STATE_ATTACK
|
static int |
BATTLE_STATE_DODGE
|
static int |
BATTLE_STATE_RUN_AWAY
|
static int |
DECESION_READY
|
static int |
NORMAL_STATE_CHASE
|
static int |
NORMAL_STATE_IDLE
|
static int |
NORMAL_STATE_PATROL
|
static int |
WOUNDED_STATE_DEAD
|
static int |
WOUNDED_STATE_HURT
|
Fields inherited from class com.brackeen.javagamebook.game.GameObject |
STATE_ACTIVE, STATE_DESTROYED, STATE_IDLE |
Constructor Summary | |
AIBot(PolygonGroup polygonGroup,
CollisionDetection collisionDetection,
Brain brain,
PolygonGroup blastModel)
|
Method Summary | |
void |
addHealth(float amount)
Adds the specified amount to this bot's health. |
boolean |
canHear(GameObject object)
Checks if this object can hear the specified object. |
boolean |
canSee(GameObject object)
Checks if this object can see the specified object, (assuming this object has eyes in the back of its head). |
int |
chooseBattleState()
|
void |
fireProjectile(Vector3D direction)
Fires a projectile in the specified direction. |
int |
getAiState()
Gets the AI state for this bot (different frm the GameObject state). |
float |
getHealth()
|
float |
getMaxHealth()
|
boolean |
isCriticalHealth()
Returns true if the health is critically low (less than CRITICAL_HEALTH_PERCENT). |
boolean |
isFlying()
Checks if this GameObject is currently flying. |
boolean |
isRegenerating()
Returns true if this bot regenerates after it dies. |
void |
notifyEndOfPath()
|
void |
notifyHitPlayer(long damage)
|
void |
notifyWallCollision()
|
void |
setPathFinder(PathFinder pathFinder)
Sets the PathFinder class to use to follow the path. |
void |
setRegenerating(boolean isRegenerating)
Sets whether this bot regenerates after it dies. |
void |
update(GameObject player,
long elapsedTime)
If this GameObject is in the active state, this method updates it's PolygonGroup. |
void |
updateHelper(GameObject player,
long elapsedTime)
|
Methods inherited from class com.brackeen.javagamebook.path.PathBot |
getFlyHeight, notifyObjectCollision, setFacing, setFlyHeight, setPathRecalcTime, setSpeed, setTurnSpeed |
Methods inherited from class com.brackeen.javagamebook.game.GameObject |
addListener, getBounds, getCeilHeight, getFloorHeight, getListener, getLocation, getName, getPolygonGroup, getSpawns, getTransform, getX, getY, getZ, isActive, isDestroyed, isIdle, isJumping, isMakingNoise, makeNoise, removeListener, sendTouchNotifications, setCeilHeight, setFloorHeight, setFlying, setJumping, setState |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int NORMAL_STATE_IDLE
public static final int NORMAL_STATE_PATROL
public static final int NORMAL_STATE_CHASE
public static final int BATTLE_STATE_ATTACK
public static final int BATTLE_STATE_DODGE
public static final int BATTLE_STATE_RUN_AWAY
public static final int WOUNDED_STATE_HURT
public static final int WOUNDED_STATE_DEAD
public static final int DECESION_READY
Constructor Detail |
public AIBot(PolygonGroup polygonGroup, CollisionDetection collisionDetection, Brain brain, PolygonGroup blastModel)
Method Detail |
public float getHealth()
public float getMaxHealth()
public void addHealth(float amount)
public boolean isCriticalHealth()
public int getAiState()
public boolean isRegenerating()
public void setRegenerating(boolean isRegenerating)
public void setPathFinder(PathFinder pathFinder)
setPathFinder
in class PathBot
public void update(GameObject player, long elapsedTime)
GameObject
update
in class PathBot
public void updateHelper(GameObject player, long elapsedTime)
public void fireProjectile(Vector3D direction)
public int chooseBattleState()
public boolean canSee(GameObject object)
public boolean canHear(GameObject object)
public boolean isFlying()
GameObject
isFlying
in class PathBot
public void notifyEndOfPath()
notifyEndOfPath
in class PathBot
public void notifyHitPlayer(long damage)
public void notifyWallCollision()
notifyWallCollision
in class PathBot
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |