unc.cdva.events.gameevents
Class GameEvent

java.lang.Object
  extended by java.util.EventObject
      extended by unc.cdva.events.gameevents.GameEvent
All Implemented Interfaces:
java.io.Serializable

public class GameEvent
extends java.util.EventObject

Define the Game Events. The Game Events are triggered by the UI and the main game timer. They are received and processed by the Game Engine

Author:
Guillaume Conte
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
GameEvent(java.lang.Object source, GameEventType type)
          Constructor which creates a new EventObject and sets the event type in this object
GameEvent(java.lang.Object source, GameEventType type, float x, float y)
          Constructor which creates a new EventObject, sets the event type in this object, and sets the x and y values of this object
 
Method Summary
 GameEventType getEventType()
           
 float getX()
           
 float getY()
           
 void setEventType(GameEventType eventType)
           
 void setX(float x)
           
 void setY(float y)
           
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GameEvent

public GameEvent(java.lang.Object source,
                 GameEventType type)
Constructor which creates a new EventObject and sets the event type in this object

Parameters:
source - Object sent to the EventObject constructor
type - type to be set in this object
See Also:
Object, GameEventType

GameEvent

public GameEvent(java.lang.Object source,
                 GameEventType type,
                 float x,
                 float y)
Constructor which creates a new EventObject, sets the event type in this object, and sets the x and y values of this object

Parameters:
source - Object sent to the EventObject constructor
type - type to be set in this object
x - x value to set in this object
y - y value to set in this object
See Also:
Object, GameEventType
Method Detail

getEventType

public GameEventType getEventType()
Returns:
eventType the type of event of this object
See Also:
GameEventType

getX

public float getX()
Returns:
x the x value of this object

getY

public float getY()
Returns:
y the y value of this object

setEventType

public void setEventType(GameEventType eventType)
Parameters:
eventType - the type of event to set in this object
See Also:
GameEventType

setX

public void setX(float x)
Parameters:
x - the x to set in this object

setY

public void setY(float y)
Parameters:
y - the y to set in this object