Added setImmediate(), made it so that old un-recompiled games are
essentially calling setImmediate() when they call set(), since set() used to be immediate. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@197 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -164,8 +164,17 @@ public class GameControlBackend
|
||||
o["getPlayers_v1"] = getPlayers_v1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a property.
|
||||
*
|
||||
* Note: immediate defaults to true, even though immediate=false is
|
||||
* the general case. We are providing some backwards compatibility
|
||||
* to old versions of setProperty_v1() that assumed immediate and did
|
||||
* not pass a 4th value.
|
||||
* All callers should now specify that value explicitely.
|
||||
*/
|
||||
public function setProperty_v1 (
|
||||
propName :String, value :Object, index :int) :void
|
||||
propName :String, value :Object, index :int, immediate :Boolean = true) :void
|
||||
{
|
||||
validatePropertyChange(propName, value, index);
|
||||
|
||||
@@ -173,6 +182,9 @@ public class GameControlBackend
|
||||
_ezObj.ezGameService.setProperty(
|
||||
_ctx.getClient(), propName, encoded, index,
|
||||
false, null, createLoggingConfirmListener("setProperty"));
|
||||
if (immediate) {
|
||||
_ezObj.applyPropertySet(propName, value, index);
|
||||
}
|
||||
}
|
||||
|
||||
public function testAndSetProperty_v1 (
|
||||
|
||||
Reference in New Issue
Block a user