Extract that handy method.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@413 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -758,12 +758,8 @@ public class GameControlBackend
|
||||
protected function endGame_v2 (... winnerIds) :void
|
||||
{
|
||||
validateConnected();
|
||||
var winners :TypedArray = TypedArray.create(int);
|
||||
while (winnerIds.length > 0) {
|
||||
winners.push(int(winnerIds.shift()));
|
||||
}
|
||||
_ezObj.ezGameService.endGame(
|
||||
_ctx.getClient(), winners, createLoggingConfirmListener("endGame"));
|
||||
_ctx.getClient(), toTypedIntArray(winnerIds), createLoggingConfirmListener("endGame"));
|
||||
}
|
||||
|
||||
protected function getDictionaryLetterSet_v1 (
|
||||
@@ -901,6 +897,18 @@ public class GameControlBackend
|
||||
_ezObj.commitTransaction();
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a Flash array of ints to a TypedArray for delivery over the wire to the server.
|
||||
*/
|
||||
protected function toTypedIntArray (array :Array) :TypedArray
|
||||
{
|
||||
var tarray :TypedArray = TypedArray.create(int);
|
||||
while (array.length > 0) {
|
||||
tarray.push(int(array.shift()));
|
||||
}
|
||||
return tarray;
|
||||
}
|
||||
|
||||
protected var _ctx :CrowdContext;
|
||||
|
||||
protected var _userListener :MessageAdapter =
|
||||
|
||||
Reference in New Issue
Block a user