diff --git a/src/as/com/threerings/ezgame/EZGame.as b/src/as/com/threerings/ezgame/EZGame.as index 8f0bdd0c..8a557be8 100644 --- a/src/as/com/threerings/ezgame/EZGame.as +++ b/src/as/com/threerings/ezgame/EZGame.as @@ -132,6 +132,11 @@ public interface EZGame */ function localChat (msg :String) :void; + /** + * Get the number of players currently in the game. + */ + function getPlayerCount () :int; + /** * Get the player names, as an array. */ diff --git a/src/as/com/threerings/ezgame/client/GameObjectImpl.as b/src/as/com/threerings/ezgame/client/GameObjectImpl.as index ad9cd4b3..64686510 100644 --- a/src/as/com/threerings/ezgame/client/GameObjectImpl.as +++ b/src/as/com/threerings/ezgame/client/GameObjectImpl.as @@ -217,6 +217,12 @@ public class GameObjectImpl extends EventDispatcher _ctx.getChatDirector().displayInfo(null, MessageBundle.taint(msg)); } + // from EZGame + public function getPlayerCount () :int + { + return _ezObj.getPlayerCount(); + } + // from EZGame public function getPlayerNames () :Array { diff --git a/src/java/com/threerings/ezgame/EZGame.java b/src/java/com/threerings/ezgame/EZGame.java index 9a0a3985..af2cbc1d 100644 --- a/src/java/com/threerings/ezgame/EZGame.java +++ b/src/java/com/threerings/ezgame/EZGame.java @@ -135,6 +135,11 @@ public interface EZGame */ public void localChat (String msg); + /** + * Get the number of players currently in the game. + */ + public int getPlayerCount (); + /** * Get the player names, as an array. */ diff --git a/src/java/com/threerings/ezgame/client/GameObjectImpl.java b/src/java/com/threerings/ezgame/client/GameObjectImpl.java index 2aa146fb..ccdfdc39 100644 --- a/src/java/com/threerings/ezgame/client/GameObjectImpl.java +++ b/src/java/com/threerings/ezgame/client/GameObjectImpl.java @@ -201,6 +201,12 @@ public class GameObjectImpl _ctx.getChatDirector().displayInfo(null, MessageBundle.taint(msg)); } + // from EZGame + public int getPlayerCount () + { + return _ezObj.getPlayerCount(); + } + // from EZGame public String[] getPlayerNames () {