vooga.games.mariogame
Class Enemy

java.lang.Object
  extended by PlayerSprite
      extended by vooga.games.mariogame.CharacterSprite
          extended by vooga.games.mariogame.Enemy

public class Enemy
extends CharacterSprite


Field Summary
 
Fields inherited from class vooga.games.mariogame.CharacterSprite
myMaxHealth
 
Constructor Summary
Enemy(java.lang.String name, java.lang.String stateName, java.awt.image.BufferedImage[] left, java.awt.image.BufferedImage[] right)
          Constructs an enemy sprite out of the parameters listed below:
 
Method Summary
 void bounce()
          Sends the sprite in the opposite direction with opposite velocity.
 
Methods inherited from class vooga.games.mariogame.CharacterSprite
getGravityCoef, getHealth, getMaxHealth, setGravityCoef, setHealth, setMaxHealth, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Enemy

public Enemy(java.lang.String name,
             java.lang.String stateName,
             java.awt.image.BufferedImage[] left,
             java.awt.image.BufferedImage[] right)
Constructs an enemy sprite out of the parameters listed below:

Parameters:
name -
stateName - - ex. alive, dead, etc...
left - - represents the image used when the sprite turns/moves left
right - - represents the image used when the sprite turns/moves right
Method Detail

bounce

public void bounce()
Sends the sprite in the opposite direction with opposite velocity. The method is named 'bounce' because it occurs after a collision with the main sprite or wall.