games.stickfighter
Class Character

java.lang.Object
  extended by vooga.gameEngine.game.GameRelatedObject
      extended by vooga.gameEngine.item.GameItem
          extended by vooga.physicsEngine.PhysicalItem
              extended by games.stickfighter.LookButNoTouchCharacter
                  extended by games.stickfighter.Character
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Renderable>, Renderable, Tangible

public abstract class Character
extends LookButNoTouchCharacter

Character extends LookButNoTouchCharacter and implements the movement controls of the character. This class allows a user to control a character in the game.

Author:
Lucas Best
See Also:
Serialized Form

Field Summary
 
Fields inherited from class vooga.physicsEngine.PhysicalItem
parameters
 
Constructor Summary
Character()
           
 
Method Summary
 void attack(int attackType)
          Causes the Character to attack.
 void defend()
          Puts the Character into a defensive position.
 void jump()
          Causes the character to jump.
 void move(boolean direction)
          Move the character LEFT or RIGHT in the 2d space.
 void usePowerUp()
          Uses a power-up.
 
Methods inherited from class games.stickfighter.LookButNoTouchCharacter
getHealth, getTeamNumber, hasPowerUp, isHuman
 
Methods inherited from class vooga.physicsEngine.PhysicalItem
applyAngularImpulse, applyImpulse, getPhysicsOn, setConstantForce, setPhysicsOn, setPosition, setPosition
 
Methods inherited from class vooga.gameEngine.item.GameItem
compareTo, getPosition, getRotation, getShape, getSize, getTexture, isVisible, move, resize, rotate, setPosition, setRotation, setSize, setVisibility
 
Methods inherited from class vooga.gameEngine.game.GameRelatedObject
addEventListener, clearListeners, equals, fire, fire, fire, getEventListeners, getID, getListenerCount, removeEventListener
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Character

public Character()
Method Detail

jump

public void jump()
Causes the character to jump.


move

public void move(boolean direction)
Move the character LEFT or RIGHT in the 2d space. The direction can be specified by the StickFighterGame static boolean LEFT or RIGHT.

Parameters:
direction -

attack

public void attack(int attackType)
Causes the Character to attack. The attackType parameter will determine what type of attack will be executed. The type of attack can be specified by the static attack constants from StickFighterGame.

Parameters:
attackType -

defend

public void defend()
Puts the Character into a defensive position.


usePowerUp

public void usePowerUp()
Uses a power-up.