Exposed a method to allow users to batch property set requests into a
dobj transaction. Thanks to mdb for the idea of accepting a function to run for the batch, rather than exposing startTransaction() and commitTransaction() directly. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@317 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -218,6 +218,9 @@ public class GameControlBackend
|
||||
o["getPlayers_v1"] = getPlayers_v1;
|
||||
o["getPlayerPosition_v1"] = getPlayerPosition_v1;
|
||||
o["getMyPosition_v1"] = getMyPosition_v1;
|
||||
|
||||
o["startTransaction"] = startTransaction_v1;
|
||||
o["commitTransaction"] = commitTransaction_v1;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -590,6 +593,23 @@ public class GameControlBackend
|
||||
_container.setFocus();
|
||||
}
|
||||
|
||||
/**
|
||||
* Start a dobj transaction on the game object.
|
||||
*/
|
||||
public function startTransaction_v1 () :void
|
||||
{
|
||||
validateConnected();
|
||||
_ezObj.startTransaction();
|
||||
}
|
||||
|
||||
/**
|
||||
* Commit a dobj transaction on the game object.
|
||||
*/
|
||||
public function commitTransaction_v1 () :void
|
||||
{
|
||||
_ezObj.commitTransaction();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience function to get our name.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user