com.brackeen.javagamebook.ai
Class Projectile
java.lang.Object
com.brackeen.javagamebook.game.GameObject
com.brackeen.javagamebook.ai.Projectile
- public class Projectile
- extends GameObject
The Blast GameObject is a projectile, designed to travel
in a straight line for five seconds, then die. Blasts
destroy Bots instantly.
Constructor Summary |
Projectile(PolygonGroup polygonGroup,
Vector3D direction,
AIBot sourceBot,
int minDamage,
int maxDamage)
Create a new Blast with the specified PolygonGroup
and normalized vector direction. |
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 |
Projectile
public Projectile(PolygonGroup polygonGroup,
Vector3D direction,
AIBot sourceBot,
int minDamage,
int maxDamage)
- Create a new Blast with the specified PolygonGroup
and normalized vector direction.
update
public void update(GameObject player,
long elapsedTime)
- Description copied from class:
GameObject
- If this GameObject is in the active state, this method
updates it's PolygonGroup. Otherwise, this method does
nothing.
- Overrides:
update
in class GameObject
isFlying
public boolean isFlying()
- Description copied from class:
GameObject
- Checks if this GameObject is currently flying. Flying
objects should not has gravity applied to them.
- Overrides:
isFlying
in class GameObject
notifyObjectCollision
public void notifyObjectCollision(GameObject object)
notifyWallCollision
public void notifyWallCollision()
notifyFloorCollision
public void notifyFloorCollision()
notifyCeilingCollision
public void notifyCeilingCollision()