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 Quest = (function (_super) {
    __extends(Quest, _super);
    function Quest(name) {
        var _this = _super.call(this) || this;
        _this._questImage = AssetManager.createBitmapByName("quest_" + name + "_png");
        _this._questImage.scaleX = _this._questImage.scaleY = 0.5;
        _this.addChild(_this._questImage);
        _this.addEventListener(egret.Event.ADDED_TO_STAGE, _this.onAdded, _this);
        return _this;
    }
    Quest.prototype.onAdded = function (e) {
        this.removeEventListener(egret.Event.ADDED_TO_STAGE, this.onAdded, this);
        this._w = this.stage.stageWidth;
        this.show();
    };
    Quest.prototype.show = function () {
        this.effect1();
    };
    Quest.prototype.effect1 = function () {
        var _this = this;
        egret.Tween.get(this._questImage).to({ x: this._w / 2 }, 500).wait(500)
            .to({ x: this._w }, 100).call(function () {
            _this.parent.removeChild(_this);
        });
    };
    return Quest;
}(egret.Sprite));
Quest.QUEST_NOSE = "nose";
Quest.QUEST_HAIR = "hair";
Quest.QUEST_LEFT_EYE = "lefrEye";
Quest.QUEST_RIGHT_EYE = "rightEye";
Quest.QUEST_LEFT_EAR = "leftEar";
Quest.QUEST_RIGHT_EAR = "rightEar";
Quest.QUEST_MOUTH = "mouth";
__reflect(Quest.prototype, "Quest");
//# sourceMappingURL=Quest.js.map