From 0ecfaac648ef6238215721fa5daeea23b918a2f8 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Thu, 5 Oct 2006 01:45:16 +0000 Subject: [PATCH] Added EZGame.getPlayerCount(). git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@98 c613c5cb-e716-0410-b11b-feb51c14d237 --- src/as/com/threerings/ezgame/EZGame.as | 5 +++++ src/as/com/threerings/ezgame/client/GameObjectImpl.as | 6 ++++++ src/java/com/threerings/ezgame/EZGame.java | 5 +++++ src/java/com/threerings/ezgame/client/GameObjectImpl.java | 6 ++++++ 4 files changed, 22 insertions(+) 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 () {