
                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/lq_collide_system/lq_collide_base.js';
                    var __require = nodeEnv ? function (request) {
                        return cc.require(request);
                    } : function (request) {
                        return __quick_compile_project__.require(request, __filename);
                    };
                    function __define (exports, require, module) {
                        if (!nodeEnv) {__quick_compile_project__.registerModule(__filename, module);}"use strict";
cc._RF.push(module, 'c22a3wcU/tBdJ/qjn/Q6uuA', 'lq_collide_base');
// Script/lq_collide_system/lq_collide_base.ts

"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.LQCollideBase = void 0;
var ccclass = cc._decorator.ccclass;
var executeInEditMode = cc._decorator.executeInEditMode;
var PolygonCollider = cc.PolygonCollider;
var property = cc._decorator.property;
var lq_collide_1 = require("./lq_collide");
var lq_const_1 = require("../lq_base/data/lq_const");
var LQCollideBase = /** @class */ (function (_super) {
    __extends(LQCollideBase, _super);
    function LQCollideBase() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.auto_update_point = true;
        return _this;
    }
    LQCollideBase.prototype.find_collide = function () {
        var collide = this.node.getComponent(lq_collide_1.LQCollide);
        if (!collide) {
            console.error(this.node.name + ':没有找到LQCollide组件');
            return undefined;
        }
        return collide;
    };
    LQCollideBase.prototype.onLoad = function () {
        var collide = this.find_collide();
        if (!collide) {
            return;
        }
        collide.init_lq_collide();
    };
    LQCollideBase.prototype.onEnable = function () {
        var collide = this.find_collide();
        if (!collide) {
            return;
        }
        collide.enable_lq_collide();
    };
    LQCollideBase.prototype.onDisable = function () {
        var collide = this.find_collide();
        if (!collide) {
            return;
        }
        collide.disable_lq_collide();
    };
    LQCollideBase.prototype.onDestroy = function () {
        var collide = this.find_collide();
        if (!collide) {
            return;
        }
    };
    LQCollideBase.prototype.onFocusInEditor = function () {
        var collide = this.find_collide();
        if (!collide) {
            return;
        }
    };
    LQCollideBase.prototype.onLostFocusInEditor = function () {
        var collide = this.find_collide();
        if (!collide) {
            return;
        }
    };
    LQCollideBase.prototype.resetInEditor = function () {
        var collide = this.find_collide();
        if (!collide) {
            return;
        }
    };
    LQCollideBase.prototype.update = function (dt) {
        if (!CC_EDITOR || !this.auto_update_point) {
            return;
        }
        var collide = this.find_collide();
        if (!collide) {
            return;
        }
        if (collide.collide_shape !== lq_const_1.LQCollideShape.Polygon) {
            return;
        }
        var polygonCollider = this.node.getComponent(PolygonCollider);
        if (!polygonCollider) {
            return;
        }
        collide.polygon_points = polygonCollider.points;
    };
    __decorate([
        property({ tooltip: '多边形自动同步cocos PolygonCollider 组件中的碰撞点' })
    ], LQCollideBase.prototype, "auto_update_point", void 0);
    LQCollideBase = __decorate([
        ccclass,
        executeInEditMode
    ], LQCollideBase);
    return LQCollideBase;
}(cc.Component));
exports.LQCollideBase = LQCollideBase;

cc._RF.pop();
                    }
                    if (nodeEnv) {
                        __define(__module.exports, __require, __module);
                    }
                    else {
                        __quick_compile_project__.registerModuleFunc(__filename, function () {
                            __define(__module.exports, __require, __module);
                        });
                    }
                })();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 6432 characters]