Allow subclasses to create custom backends.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@143 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user