var __reflect = (this && this.__reflect) || function (p, c, t) {
    p.__class__ = c, t ? t.push(c) : t = [c], p.__types__ = p.__types__ ? t.concat(p.__types__) : t;
};
var __extends = (this && this.__extends) || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var GameStart = (function (_super) {
    __extends(GameStart, _super);
    function GameStart() {
        var _this = _super.call(this) || this;
        _this.bg = AssetManager.createBitmapByName("gameStart_bg_png");
        _this.btnStart = AssetManager.createBitmapByName("btnStart_png");
        _this.btnLoad = AssetManager.createBitmapByName("btnLoad_png");
        _this.btnInfo = AssetManager.createBitmapByName("btnInfo_png");
        _this.btnStart.touchEnabled = true;
        _this.btnLoad.touchEnabled = true;
        _this.btnInfo.touchEnabled = true;
        _this.btnStart.addEventListener(egret.TouchEvent.TOUCH_END, _this.onTouchStart, _this);
        _this.btnLoad.addEventListener(egret.TouchEvent.TOUCH_END, _this.onTouchLoad, _this);
        _this.btnInfo.addEventListener(egret.TouchEvent.TOUCH_END, _this.onTouchInfo, _this);
        return _this;
    }
    GameStart.prototype.init = function () {
        this.bg.x = this.stage.stageWidth / 2;
        this.bg.y = this.stage.stageHeight / 2;
        this.addChild(this.bg);
        this.btnStart.x = this.stage.stageWidth / 2;
        this.btnStart.y = this.stage.stageHeight / 2;
        this.btnLoad.x = this.btnStart.x;
        this.btnLoad.y = this.btnStart.y + 200;
        this.btnInfo.x = this.btnStart.x;
        this.btnInfo.y = this.btnStart.y + 400;
        // this.touchEnabled = true;
        // this.addEventListener(egret.TouchEvent.TOUCH_END, this.onTouch, this);
        this.addChild(this.btnStart);
        this.addChild(this.btnLoad);
        this.addChild(this.btnInfo);
        packageList.visible = false;
        console.log("game start");
    };
    GameStart.prototype.onTouchInfo = function (e) {
        this.next("gameInfo");
    };
    GameStart.prototype.onTouchLoad = function (e) {
        Game.instance.loadGame();
        this.next("gameLevel");
    };
    GameStart.prototype.onTouchStart = function (e) {
        Game.instance.resetGame();
        this.next("gameLevel");
    };
    return GameStart;
}(Scene));
__reflect(GameStart.prototype, "GameStart");
//# sourceMappingURL=GameStart.js.map