Created listener interfaces that will automatically be registered

if implemented by something on the display hierarchy.
You may also implement them in utility classes and register and unregister
event listening by hand.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@55 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Ray Greenwell
2006-08-24 00:15:49 +00:00
parent b118e302a3
commit a465884a84
11 changed files with 185 additions and 18 deletions
@@ -5,7 +5,7 @@ import flash.events.Event;
/**
* Dispatched when the state of the game has changed.
*/
public class StateChangedEvent extends Event
public class StateChangedEvent extends EZEvent
{
/** Indicates that the game has transitioned to a started state. */
public static const GAME_STARTED :String = "GameStarted";
@@ -17,9 +17,9 @@ public class StateChangedEvent extends Event
// TODO: move to own event?
public static const TURN_CHANGED :String = "TurnChanged";
public function StateChangedEvent (type :String)
public function StateChangedEvent (type :String, ezgame :EZGame)
{
super(type);
super(type, ezgame);
}
override public function toString () :String
@@ -29,7 +29,7 @@ public class StateChangedEvent extends Event
override public function clone () :Event
{
return new StateChangedEvent(type);
return new StateChangedEvent(type, _ezgame);
}
}
}