Updates to EZGame to allow games to store 'user cookies'.
Then intention is that other games besides EZGame may use this as well, so it's semi-separated, but for now it's part of EZGame. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@123 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -10,6 +10,8 @@ import com.threerings.io.ObjectInputStream;
|
||||
import com.threerings.io.ObjectOutputStream;
|
||||
import com.threerings.io.TypedArray;
|
||||
|
||||
import com.threerings.presents.dobj.DSet;
|
||||
|
||||
import com.threerings.parlor.game.data.GameObject;
|
||||
import com.threerings.parlor.turn.data.TurnGameObject;
|
||||
|
||||
@@ -31,6 +33,9 @@ public class EZGameObject extends GameObject
|
||||
/** The field name of the <code>turnHolder</code> field. */
|
||||
public static const TURN_HOLDER :String = "turnHolder";
|
||||
|
||||
/** The field name of the <code>userCookies</code> field. */
|
||||
public static const USER_COOKIES :String = "userCookies";
|
||||
|
||||
/** The field name of the <code>ezGameService</code> field. */
|
||||
public static const EZ_GAME_SERVICE :String = "ezGameService";
|
||||
// AUTO-GENERATED: FIELDS END
|
||||
@@ -38,6 +43,9 @@ public class EZGameObject extends GameObject
|
||||
/** The current turn holder. */
|
||||
public var turnHolder :Name;
|
||||
|
||||
/** A set of loaded user cookies. */
|
||||
public var userCookies :DSet;
|
||||
|
||||
/** The service interface for requesting special things from the server. */
|
||||
public var ezGameService :EZGameMarshaller;
|
||||
|
||||
@@ -134,6 +142,7 @@ public class EZGameObject extends GameObject
|
||||
|
||||
// first read any regular bits
|
||||
turnHolder = (ins.readObject() as Name);
|
||||
userCookies = (ins.readObject() as DSet);
|
||||
ezGameService = (ins.readObject() as EZGameMarshaller);
|
||||
|
||||
// then user properties
|
||||
|
||||
Reference in New Issue
Block a user