ch.sahits.game.event
Class Event
java.lang.Object
ch.sahits.game.event.Event
- Direct Known Subclasses:
- KeyPressEvent, MouseClickEvent, MouseMoveEvent, PlayerChangeEvent, StartEvent, TimeChangeEvent, ViewChangeEvent
public class Event
- extends Object
Base class for the Events passed in the game. The queue is implemented as a FIFO queue.
All methods are quarded by the same lock to ensure thread savety.
- Author:
- andi
|
Constructor Summary |
Event()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
listeners
private static ConcurrentLinkedQueue<IEventListener> listeners
lock
private static final Object lock
Event
public Event()
add
public static void add(IEventListener listener)
remove
public static void remove(IEventListener listener)
notify
public void notify(Object eventNotice)
Copyright © 2012 Sahits GmbH. All Rights Reserved.