com.brackeen.javagamebook.shooter3D
Class JumpingGameObject

java.lang.Object
  extended bycom.brackeen.javagamebook.game.GameObject
      extended bycom.brackeen.javagamebook.shooter3D.JumpingGameObject
Direct Known Subclasses:
Player

public class JumpingGameObject
extends GameObject

A GameObject that can jump.


Field Summary
static float DEFAULT_JUMP_HEIGHT
           
 
Fields inherited from class com.brackeen.javagamebook.game.GameObject
STATE_ACTIVE, STATE_DESTROYED, STATE_IDLE
 
Constructor Summary
JumpingGameObject(PolygonGroup group)
           
 
Method Summary
 void notifyFloorCollision()
           
 void setJumpHeight(float jumpHeight)
          Sets how high this GameObject can jump.
 void setJumping(boolean isJumping)
          Causes this GameObject to jump if the jumping flag is set and this object is not already jumping.
 
Methods inherited from class com.brackeen.javagamebook.game.GameObject
addListener, getBounds, getCeilHeight, getFloorHeight, getListener, getLocation, getName, getPolygonGroup, getSpawns, getTransform, getX, getY, getZ, isActive, isDestroyed, isFlying, isIdle, isJumping, isMakingNoise, makeNoise, removeListener, sendTouchNotifications, setCeilHeight, setFloorHeight, setFlying, setState, update
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_JUMP_HEIGHT

public static final float DEFAULT_JUMP_HEIGHT
See Also:
Constant Field Values
Constructor Detail

JumpingGameObject

public JumpingGameObject(PolygonGroup group)
Method Detail

setJumpHeight

public void setJumpHeight(float jumpHeight)
Sets how high this GameObject can jump.


setJumping

public void setJumping(boolean isJumping)
Causes this GameObject to jump if the jumping flag is set and this object is not already jumping.

Overrides:
setJumping in class GameObject

notifyFloorCollision

public void notifyFloorCollision()