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 Scene = (function (_super) {
    __extends(Scene, _super);
    function Scene() {
        var _this = _super.call(this) || this;
        _this.addEventListener(egret.Event.ADDED_TO_STAGE, _this.onAdded, _this);
        return _this;
    }
    Scene.prototype.onAdded = function (e) {
        //this.removeEventListener(egret.Event.ADDED_TO_STAGE, this.onAdded, this);
        this.init();
    };
    Scene.prototype.init = function () {
        console.log("this is a scene");
    };
    Scene.prototype.show = function (parent) {
        parent.addChild(this);
    };
    Scene.prototype.next = function (scene) {
        this.dispatchEvent(new SceneEvent(SceneEvent.NEXT, scene));
        this.parent.removeChild(this);
    };
    Scene.prototype.tick = function (advancedTime) {
    };
    return Scene;
}(egret.DisplayObjectContainer));
__reflect(Scene.prototype, "Scene", ["IScene", "egret.IEventDispatcher"]);
//# sourceMappingURL=Scene.js.map