"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var GameView_1 = require("./GameView");
var props_1 = require("../props");
var GameWrapper = (function (_super) {
    __extends(GameWrapper, _super);
    function GameWrapper() {
        var _this = _super.call(this) || this;
        engine.globalEvent.addEventListener('doll-machine2-game-init', _this.reset, _this);
        engine.globalEvent.addEventListener('doll-machine2-game-start', _this.start, _this);
        var gameView = _this._gameView = new GameView_1.default();
        _this.addChild(gameView);
        return _this;
    }
    GameWrapper.prototype.reset = function (event) {
        props_1.injectProps(event.data);
        this._gameView.visible = true;
        this._gameView.reset();
    };
    GameWrapper.prototype.start = function (event) {
        console.log('监听开始');
        props_1.injectProps(event.data);
        this._gameView.start(event.data);
    };
    GameWrapper.prototype.pause = function () {
        this._gameView.pause();
    };
    GameWrapper.prototype.resume = function () {
        this._gameView.resume();
    };
    GameWrapper.prototype.revive = function () {
        this._gameView.revive();
    };
    GameWrapper.prototype.clear = function () {
        this._gameView.visible = false;
    };
    GameWrapper.prototype.onTap = function (event) {
    };
    return GameWrapper;
}(engine.Container));
exports.GameWrapper = GameWrapper;
