var __extends = this.__extends || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    __.prototype = b.prototype;
    d.prototype = new __();
};
var GameGroups;
(function (GameGroups) {
    var StartingGroup = (function (_super) {
        __extends(StartingGroup, _super);
        function StartingGroup(game, name, x, y, json) {
            _super.call(this, game, name, x, y, json);
        }
        StartingGroup.prototype.init = function (json) {
            _super.prototype.init.call(this, json);
        };
        StartingGroup.prototype.preload = function () {
            _super.prototype.preload.call(this);
            JD.loadScript(this.json.GameType);
        };
        StartingGroup.prototype.create = function () {
            _super.prototype.create.call(this);
            this.obj = this.gameFactory(this.json.GameType);
            this.obj.preload();
            this.addChild(this.obj);
        };
        StartingGroup.prototype.gameFactory = function (gameType) {
            return eval("new " + GameTypes[gameType] + "." + GameTypes[gameType] + "(this.game, this.name, Global.Main.mainContainerDims.x, Global.Main.mainContainerDims.y, this.json);");
        };
        return StartingGroup;
    })(Base.BasicGroup);
    GameGroups.StartingGroup = StartingGroup;
})(GameGroups || (GameGroups = {}));
//# sourceMappingURL=GameGroups.js.map