Occupant events.

Undocumented, I'm sure we'll change some things around soon.
Fixed a few bugs, too.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@190 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Ray Greenwell
2007-02-14 23:50:33 +00:00
parent c8ee960c0d
commit ee871c3f2f
4 changed files with 154 additions and 6 deletions
@@ -0,0 +1,45 @@
package com.threerings.ezgame {
import flash.events.Event;
public class OccupantChangedEvent extends EZEvent
{
public static const OCCUPANT_ENTERED :String = "OccupantEntered";
public static const OCCUPANT_LEFT :String = "OccupantLeft";
/** The occupantId of the occupant that entered or left. */
public function get occupantId () :int
{
return _occupantId;
}
/** Is/was the occupant a player? If false, they are/were a watcher. */
public function get player () :Boolean
{
return _player;
}
public function OccupantChangedEvent (
type :String, ezgame :EZGameControl, occupantId :int, player :Boolean)
{
super(type, ezgame);
_occupantId = occupantId;
_player = player;
}
override public function toString () :String
{
return "[OccupantChangedEvent type=" + type +
", occupantId=" + _occupantId +
", player=" + _player + "]";
}
override public function clone () :Event
{
return new OccupantChangedEvent(type, _ezgame, _occupantId, _player);
}
protected var _occupantId :int;
protected var _player :Boolean;
}
}