Files
vilya/src/as/com/threerings/ezgame/OccupantChangedEvent.as
T
Ray Greenwell ee871c3f2f 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
2007-02-14 23:50:33 +00:00

46 lines
1.2 KiB
ActionScript

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;
}
}