vooga.games.grandius.sprites
Class Player

java.lang.Object
  extended by com.golden.gamedev.object.Sprite
      extended by vooga.engine.core.BetterSprite
          extended by vooga.games.grandius.sprites.Player

public class Player
extends BetterSprite


Constructor Summary
Player()
           
Player(java.lang.String label)
           
 
Method Summary
 void moveDown()
           
 void moveLeft()
           
 void moveRight()
           
 void moveUp()
           
 void setInvincible()
           
 void updateCash(int cash)
          Adds the given cash amounts to the Stat cash.
 int updatePlayerLives()
          Decrements the number of lives the player has.
 void updateScore(int points)
          Adds the given points to the Stat score.
 void updateStat(Stat<java.lang.Integer> stat, int addedValue)
          Method for adding a value (including negative ones) to any Stat, primarily for the lives, cash, and score counters.
 
Methods inherited from class vooga.engine.core.BetterSprite
addAnimatedImages, addHorizontalSpeed, addImage, addSprite, addVerticalSpeed, firstRun, forceX, forceY, getCurrentSprite, getDistance, getDoubleStat, getHeight, getHorizontalSpeed, getImage, getIntStat, getStat, getTimeInExistence, getVerticalSpeed, getWidth, getX, getY, isActive, isOnScreen, move, moveTo, moveX, moveY, render, setActive, setAsRenderedSprite, setBackground, setDoubleStat, setHorizontalSpeed, setImage, setImages, setIntStat, setLayer, setLocation, setMovement, setSpeed, setStat, setVerticalSpeed, setX, setY, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Player

public Player()

Player

public Player(java.lang.String label)
Method Detail

moveLeft

public void moveLeft()

moveRight

public void moveRight()

moveUp

public void moveUp()

moveDown

public void moveDown()

updatePlayerLives

public int updatePlayerLives()
Decrements the number of lives the player has. Called when Player collides with enemy or an enemy projectile.


updateStat

public void updateStat(Stat<java.lang.Integer> stat,
                       int addedValue)
Method for adding a value (including negative ones) to any Stat, primarily for the lives, cash, and score counters.


updateScore

public void updateScore(int points)
Adds the given points to the Stat score.


updateCash

public void updateCash(int cash)
Adds the given cash amounts to the Stat cash.


setInvincible

public void setInvincible()