|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSprite
com.brackeen.javagamebook.tilegame.sprites.Creature
com.brackeen.javagamebook.tilegame.sprites.Player
public class Player
The Player.
Field Summary |
---|
Fields inherited from class com.brackeen.javagamebook.tilegame.sprites.Creature |
---|
STATE_DEAD, STATE_DYING, STATE_NORMAL |
Constructor Summary | |
---|---|
Player(Animation left,
Animation right,
Animation deadLeft,
Animation deadRight)
|
Method Summary | |
---|---|
void |
collideHorizontal()
Called before update() if the creature collided with a tile horizontally. |
void |
collideVertical()
Called before update() if the creature collided with a tile vertically. |
float |
getMaxSpeed()
Gets the maximum speed of this Creature. |
void |
jump(boolean forceJump)
Makes the player jump if the player is on the ground or if forceJump is true. |
void |
setY(float y)
|
void |
wakeUp()
Wakes up the creature when the Creature first appears on screen. |
Methods inherited from class com.brackeen.javagamebook.tilegame.sprites.Creature |
---|
clone, getState, isAlive, isFlying, setState, update |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Player(Animation left, Animation right, Animation deadLeft, Animation deadRight)
Method Detail |
---|
public void collideHorizontal()
Creature
collideHorizontal
in class Creature
public void collideVertical()
Creature
collideVertical
in class Creature
public void setY(float y)
public void wakeUp()
Creature
wakeUp
in class Creature
public void jump(boolean forceJump)
public float getMaxSpeed()
Creature
getMaxSpeed
in class Creature
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |