"use strict";
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 __extends(t, e) { 
 function r() { 
 this.constructor = t;
}
for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i]);
r.prototype = e.prototype, t.prototype = new r();
};
Object.defineProperty(exports, "__esModule", { value: true });
var DogShowItemComponent = (function (_super) {
    __extends(DogShowItemComponent, _super);
    /**
     *
     * @param lv 等级
     * @param name 狗名
     * @param iconName 资源名
     * @param callBack
     */
    function DogShowItemComponent(lv, name, iconName, size, callBack) {
        if (callBack === void 0) { callBack = null; }
        var _this = _super.call(this) || this;
        _this.skinName = 'resource/skins/component/DogShowItemComponent.exml';
        _this.clickCallBack = callBack;
        _this.lv = lv;
        _this.size = size;
        _this.dName = name;
        _this.iconName = iconName;
        _this.addEventListener(egret.Event.COMPLETE, _this.onSkinComplete, _this);
        if (_this.skin) {
            _this.onSkinComplete();
        }
        return _this;
    }
    DogShowItemComponent.prototype.onSkinComplete = function () {
        this.lvLb.text = 'LV.' + this.lv;
        this.dogNameLb.text = this.dName;
        this.dImg = new eui.Image();
        this.dImg.source = this.iconName;
        this.dogImgGroup.addChild(this.dImg);
        this.dImg.anchorOffsetX = this.size[0] * 0.5;
        this.dImg.anchorOffsetY = this.size[1] * 0.5;
        this.dImg.x = this.dogImgGroup.width * 0.5;
        this.dImg.y = this.dogImgGroup.height * 0.5;
        this.removeEventListener(egret.Event.COMPLETE, this.onSkinComplete, this);
    };
    DogShowItemComponent.prototype.removeEvent = function () {
    };
    DogShowItemComponent.prototype.onClick = function () {
        if (this.clickCallBack) {
            this.clickCallBack(this);
        }
    };
    DogShowItemComponent.prototype.playAct = function (start) {
        if (start === void 0) { start = 0; }
    };
    DogShowItemComponent.prototype.stopAct = function () {
        // this.act.stop();
    };
    return DogShowItemComponent;
}(eui.Component));
exports.DogShowItemComponent = DogShowItemComponent;
__reflect(DogShowItemComponent.prototype, "\"c:/Users/duiba/Documents/kuwo/egret/src/components/DogShowItemComponent\".DogShowItemComponent");
//# sourceMappingURL=DogShowItemComponent.js.map