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 PackageList = (function (_super) {
    __extends(PackageList, _super);
    function PackageList() {
        var _this = _super.call(this) || this;
        _this.isShow = false;
        return _this;
    }
    PackageList.prototype.partAdded = function (partName, instance) {
        _super.prototype.partAdded.call(this, partName, instance);
    };
    PackageList.prototype.childrenCreated = function () {
        _super.prototype.childrenCreated.call(this);
        this.ac.removeAll();
        this.group.y = this.height - 355 + 270;
        this.packageBtn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onClickHandler, this);
        this.suicideBtn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onClickSuicideHandler, this);
    };
    PackageList.prototype.onClickSuicideHandler = function (e) {
        this.dispatchEvent(new egret.Event("suicide"));
    };
    PackageList.prototype.onClickHandler = function (e) {
        if (!this.isShow) {
            egret.Tween.get(this.group).to({ y: this.height - 355 }, 300);
        }
        else {
            egret.Tween.get(this.group).to({ y: this.height - 355 + 270 }, 300);
        }
        this.isShow = !this.isShow;
    };
    PackageList.prototype.addID = function (packageID) {
        this.ac.addItem({ id: packageID });
    };
    return PackageList;
}(eui.Component));
__reflect(PackageList.prototype, "PackageList", ["eui.UIComponent", "egret.DisplayObject"]);
var packageList;
//# sourceMappingURL=PackageList.js.map