unc.cdva.events.gameevents
Class GameEvent
java.lang.Object
java.util.EventObject
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
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 |
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 |
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 constructortype
- 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 constructortype
- type to be set in this objectx
- x value to set in this objecty
- y value to set in this object- See Also:
Object
,
GameEventType
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