"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 MyImage = (function (_super) {
    __extends(MyImage, _super);
    function MyImage() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * 检测道具碰撞
     * @param wallet
     * @return {boolean}
     */
    MyImage.prototype.hitTest = function (orgX, orgY, rect) {
        //条件1 掉落单位y轴的中心点大于人物y轴的中心点
        var condition1 = Math.abs(this.y + this.iHeight * 0.5 - (orgY + rect.y)) < (rect.height + this.iHeight) * 0.4;
        //条件2 掉落单位y轴的中心点小于人物的y坐标+人物高度
        var condition2 = Math.abs(this.x + this.iWidth * 0.5 - (orgX + rect.x)) < (rect.width + this.iWidth) * 0.4;
        return condition1 && condition2;
    };
    return MyImage;
}(eui.Image));
exports.default = MyImage;
__reflect(MyImage.prototype, "\"/Users/chiwang/Desktop/\u5151\u5427\u5DE5\u4F5C/newGame/saolei19.03.06/db-game-template/egret/src/gameScene/MyImage\".MyImage");
//# sourceMappingURL=MyImage.js.map