|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.haphazard.XML.MessageHandler
org.haphazard.gui.engine.GlobalWorld
Handles the world
Field Summary | |
java.util.Vector |
mEnemy
Temporary variable to hold the evil twin(s) |
java.util.Vector |
mReusedEnemies
|
static Vector3D |
NE_DIRECTION
|
static Vector3D |
NW_DIRECTION
|
static Vector3D |
SE_DIRECTION
|
static Vector3D |
SW_DIRECTION
|
Fields inherited from class org.haphazard.XML.MessageHandler |
mMessageBuffer |
Method Summary | |
Map |
getCurrentMap()
Gets the current map |
static GlobalWorld |
getInstance()
Returns an instance of the world |
Map |
getMap(java.lang.String mapKey)
Gets any of all the defined maps |
static Point3D |
getOppositeDirection(Point3D direction)
Returns the opposite direction |
void |
init()
Initiates the world and loads all stuff |
void |
killAllEnemies()
|
void |
paintComponent(java.awt.Graphics2D g,
int windowWidth,
int windowHeight)
Paints the world |
void |
register(Action action)
Registers an action |
void |
run()
Starts the world thread |
void |
setIOHandler(IOHandler ioHandler)
|
void |
spawn(Character character)
Temporary function to spawn a new unit |
void |
unregister(Action action)
Unregisters an action from the world |
Methods inherited from class org.haphazard.XML.MessageHandler |
addMessage, getNextMessage, hasMessage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final Vector3D NW_DIRECTION
public static final Vector3D SW_DIRECTION
public static final Vector3D NE_DIRECTION
public static final Vector3D SE_DIRECTION
public java.util.Vector mEnemy
public java.util.Vector mReusedEnemies
Method Detail |
public static GlobalWorld getInstance()
public void init()
public void setIOHandler(IOHandler ioHandler)
public void killAllEnemies()
public static Point3D getOppositeDirection(Point3D direction)
direction
- The direction to find the opposite for
public Map getCurrentMap()
public Map getMap(java.lang.String mapKey)
mapKey
- The name of the map to get
public void register(Action action)
action
- the action to registerpublic void unregister(Action action)
action
- The action to removepublic void run()
public void paintComponent(java.awt.Graphics2D g, int windowWidth, int windowHeight)
g
- The graphics to use to paint itwindowWidth
- The width of the window to paint inwindowHeight
- The height of the window to paint inpublic void spawn(Character character)
character
- The character to respawn somewhere on the map
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |