|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--nankin.zheng.gatem.model.GameEvent
GameEvent works as the medium of the communication among different roles.
It is a read-only bean. It can be extended by a certain game to provide more complex event.
Field Summary | |
private AttributeSet |
attributeSet
|
private GameContainer |
container
|
private static int |
createdInstanceCount
|
private static int |
finalizedInstanceCount
|
private int |
id
|
private Role |
source
|
Constructor Summary | |
GameEvent(int eid,
GameContainer gcont,
Role src)
Constructor with a minimun parameter list. |
|
GameEvent(int eid,
GameContainer gcont,
Role src,
AttributeSet attrs)
Constructor with a complete parameter list. |
Method Summary | |
AttributeSet |
getAttributeSet()
Get source role attribute set. |
GameContainer |
getContainer()
Get source game container. |
static int |
getCreatedInstanceCount()
|
static int |
getFinalizedInstanceCount()
|
int |
getId()
Get event id. |
Role |
getSource()
Get source role object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static int createdInstanceCount
private static int finalizedInstanceCount
private int id
private GameContainer container
private Role source
private AttributeSet attributeSet
Constructor Detail |
public GameEvent(int eid, GameContainer gcont, Role src)
eid
- event id, which is defined in a game-dependent environment.gcont
- game container where this event is fired.src
- source role who fires this event.
java.lang.NullPointerException
- if gcont or src is null.public GameEvent(int eid, GameContainer gcont, Role src, AttributeSet attrs)
eid
- event idgcont
- game containersrc
- source roleattrs
- attributes of source role
java.lang.NullPointerException
- if gcont, src or attrs is null.Method Detail |
public static int getCreatedInstanceCount()
public static int getFinalizedInstanceCount()
public int getId()
public Role getSource()
public GameContainer getContainer()
public AttributeSet getAttributeSet()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |