From ee8f636d7e68f53282deea141e85146cf83c0d55 Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Wed, 10 Jan 2007 06:16:37 +0000 Subject: [PATCH] Allow subclasses to create custom backends. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@143 c613c5cb-e716-0410-b11b-feb51c14d237 --- src/as/com/threerings/ezgame/client/EZGamePanel.as | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/as/com/threerings/ezgame/client/EZGamePanel.as b/src/as/com/threerings/ezgame/client/EZGamePanel.as index fdee100d..2d9996fa 100644 --- a/src/as/com/threerings/ezgame/client/EZGamePanel.as +++ b/src/as/com/threerings/ezgame/client/EZGamePanel.as @@ -47,7 +47,7 @@ public class EZGamePanel extends VBox var cfg :EZGameConfig = (_ctrl.getPlaceConfig() as EZGameConfig); _ezObj = (plobj as EZGameObject); - backend = new GameControlBackend(_ctx, _ezObj); + backend = createBackend(); _gameView = new GameContainer(cfg.configData); // TODO? backend.setSharedEvents( @@ -65,6 +65,14 @@ public class EZGamePanel extends VBox backend.shutdown(); } + /** + * Creates the backend object that will handle requests from user code. + */ + protected function createBackend () :GameControlBackend + { + return new GameControlBackend(_ctx, _ezObj); + } + protected var _ctx :CrowdContext; protected var _ctrl :EZGameController;