Moved default field deserialization code into separate method to allow
subclasses to read additional fields. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@142 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -141,9 +141,7 @@ public class EZGameObject extends GameObject
|
|||||||
super.readObject(ins);
|
super.readObject(ins);
|
||||||
|
|
||||||
// first read any regular bits
|
// first read any regular bits
|
||||||
turnHolder = (ins.readObject() as Name);
|
readDefaultFields(ins);
|
||||||
userCookies = (ins.readObject() as DSet);
|
|
||||||
ezGameService = (ins.readObject() as EZGameMarshaller);
|
|
||||||
|
|
||||||
// then user properties
|
// then user properties
|
||||||
var count :int = ins.readInt();
|
var count :int = ins.readInt();
|
||||||
@@ -154,6 +152,16 @@ public class EZGameObject extends GameObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reads the fields written by the default serializer for this instance.
|
||||||
|
*/
|
||||||
|
protected function readDefaultFields (ins :ObjectInputStream) :void
|
||||||
|
{
|
||||||
|
turnHolder = (ins.readObject() as Name);
|
||||||
|
userCookies = (ins.readObject() as DSet);
|
||||||
|
ezGameService = (ins.readObject() as EZGameMarshaller);
|
||||||
|
}
|
||||||
|
|
||||||
/** The raw properties set by the game. */
|
/** The raw properties set by the game. */
|
||||||
protected var _props :Object = new Object();
|
protected var _props :Object = new Object();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user