org.haphazard.system.action
Class GlobalGUIController

java.lang.Object
  extended byorg.haphazard.XML.MessageHandler
      extended byorg.haphazard.system.action.Action
          extended byorg.haphazard.system.action.CharacterAction
              extended byorg.haphazard.system.action.GlobalGUIController
All Implemented Interfaces:
java.util.Observer

public class GlobalGUIController
extends CharacterAction
implements java.util.Observer


Field Summary
 
Fields inherited from class org.haphazard.system.action.CharacterAction
ATTACK, CARRY, DEFEND, DIE, DROP, mCharacter, MOVE, mTarget, mWorld, NOTHING, SAY, WEAR
 
Fields inherited from class org.haphazard.system.action.Action
mController, mExecutionTime, mTimeStarted
 
Fields inherited from class org.haphazard.XML.MessageHandler
mMessageBuffer
 
Method Summary
 void changeCameraMode()
           
 Character findTarget()
           
static GlobalGUIController getInstance()
           
 void paint(java.awt.Graphics2D graphics)
          Paints the component using the graphics specified
 boolean perform()
          Performs the action
protected  boolean performAttack()
          Performs the attack
protected  boolean performCarry()
          Performs carry
protected  boolean performDeath()
          Performs death
protected  boolean performDrop()
          Performs drop
protected  boolean performMove()
          Overrides action performMove to fix camera location
protected  boolean performWear()
          Performs wear
 void update(java.util.Observable observable, java.lang.Object obj)
           
 
Methods inherited from class org.haphazard.system.action.CharacterAction
attack, carry, defend, die, drop, getActionType, getCharacter, move, move, performDefend, performSay, say, setCharacter, wear
 
Methods inherited from class org.haphazard.system.action.Action
equals, start
 
Methods inherited from class org.haphazard.XML.MessageHandler
addMessage, getNextMessage, hasMessage
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static GlobalGUIController getInstance()

changeCameraMode

public void changeCameraMode()

perform

public boolean perform()
Description copied from class: CharacterAction
Performs the action

Overrides:
perform in class CharacterAction
Returns:
true if terminated for whatever reason

performMove

protected boolean performMove()
Overrides action performMove to fix camera location

Overrides:
performMove in class CharacterAction
Returns:
true if action is canceled for whatever reason

performAttack

protected boolean performAttack()
Description copied from class: CharacterAction
Performs the attack

Overrides:
performAttack in class CharacterAction
Returns:
true if CharacterAction is terminated for whatever reason

performDeath

protected boolean performDeath()
Description copied from class: CharacterAction
Performs death

Overrides:
performDeath in class CharacterAction
Returns:
true if the CharacterAction is terminated

performWear

protected boolean performWear()
Description copied from class: CharacterAction
Performs wear

Overrides:
performWear in class CharacterAction
Returns:
true if the CharacterAction is terminated

performCarry

protected boolean performCarry()
Description copied from class: CharacterAction
Performs carry

Overrides:
performCarry in class CharacterAction
Returns:
true if the CharacterAction is terminated

performDrop

protected boolean performDrop()
Description copied from class: CharacterAction
Performs drop

Overrides:
performDrop in class CharacterAction
Returns:
true if the CharacterAction is terminated

update

public void update(java.util.Observable observable,
                   java.lang.Object obj)
Specified by:
update in interface java.util.Observer

findTarget

public Character findTarget()

paint

public void paint(java.awt.Graphics2D graphics)
Paints the component using the graphics specified

Parameters:
graphics - The graphics to use