Added tick services to EZGame.

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@82 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Ray Greenwell
2006-10-02 07:39:31 +00:00
parent a82fc55fa4
commit 6472cf6f80
11 changed files with 295 additions and 2 deletions
@@ -74,5 +74,16 @@ public interface EZGameService extends InvocationService
client :Client, collName :String, consume :Boolean, count :int,
msgOrPropName :String, playerIndex :int,
listener :InvocationService_ConfirmListener) :void;
/**
* Start a ticker that will send out timestamp information at
* the interval specified.
*
* @param msOfDelay must be at least 50, or 0 may be set to halt
* and clear a previously started ticker.
*/
function setTicker (
client :Client, tickerName :String, msOfDelay :int,
listener :InvocationService_InvocationListener) :void;
}
}
@@ -184,6 +184,20 @@ public class GameObjectImpl extends EventDispatcher
createLoggingListener("sendMessage"));
}
// from EZGame
public function startTicker (tickerName :String, msOfDelay :int) :void
{
validateName(tickerName);
_ezObj.ezGameService.setTicker(_ctx.getClient(),
tickerName, msOfDelay, createLoggingListener("setTicker"));
}
// from EZGame
public function stopTicker (tickerName :String) :void
{
startTicker(tickerName, 0);
}
// from EZGame
public function sendChat (msg :String) :void
{