Esempio n. 1
0
 /**
  * Causes this GameObject to jump if the jumping flag is set and this object is not already
  * jumping.
  */
 public void setJumping(boolean isJumping) {
   if (isJumping() != isJumping) {
     super.setJumping(isJumping);
     if (isJumping) {
       Physics.getInstance().jump(this, jumpVelocity);
     }
   }
 }
Esempio n. 2
0
 /**
  * Sets the state of the specified object. This allows any GameObject to set the state of any
  * other GameObject. The state should be either STATE_IDLE, STATE_ACTIVE, or STATE_DESTROYED.
  */
 protected void setState(GameObject object, int state) {
   object.setState(state);
 }