EZGameControl updates:

- switched everything to be based on playerId instead of index
  (which doesn't make sense for a party game.)
- started adding new functions
- backwards compatible with all old games!


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@186 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Ray Greenwell
2007-02-14 01:59:29 +00:00
parent 00e771e7a5
commit e5d5480e9b
9 changed files with 368 additions and 189 deletions
@@ -15,8 +15,8 @@ import com.threerings.ezgame.util.EZObjectMarshaller;
public class UserCookie
implements DSet_Entry
{
/** The index of the player that has this cookie. */
public var playerIndex :int;
/** The id of the player that has this cookie. */
public var playerId :int;
/** The decoded cookie value. */
public var cookie :Object;
@@ -24,13 +24,13 @@ public class UserCookie
// from DSet_Entry
public function getKey () :Object
{
return playerIndex;
return playerId;
}
// from superinterface Streamable
public function readObject (ins :ObjectInputStream) :void
{
playerIndex = ins.readInt();
playerId = ins.readInt();
var ba :ByteArray = (ins.readField(ByteArray) as ByteArray);
cookie = EZObjectMarshaller.decode(ba);
}