module GameGroups {
    export class StartingGroup extends Base.BasicGroup {
        obj;
        constructor(game, name, x, y, json) {
            super(game, name, x, y, json);
        }
        init(json) {
            super.init(json);
        }
        preload() {
            super.preload();
            JD.loadScript(this.json.GameType);
        }
        create() {
            super.create();
            this.obj = this.gameFactory(this.json.GameType);
            this.obj.preload();
            this.addChild(this.obj);
        }
        gameFactory(gameType) {
            return eval("new " + GameTypes[gameType]+ "." + GameTypes[gameType] + "(this.game, this.name, Global.Main.mainContainerDims.x, Global.Main.mainContainerDims.y, this.json);");
         }

    }
}