"use strict";
cc._RF.push(module, 'c58deN2u1NGZL8nJwvnu1PR', 'Block');
// Script/Block.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.PathType = exports.BlockColor = exports.BlockType = void 0;
var lq_collide_system_1 = require("./lq_collide_system/lq_collide_system");
var Map_1 = require("./Map");
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var BlockType;
(function (BlockType) {
    /*普通地块 */
    BlockType[BlockType["\u666E\u901A\u5757"] = 0] = "\u666E\u901A\u5757";
    /*起点地块 */
    BlockType[BlockType["\u53E0\u52A0\u5757\u4E0B"] = 1] = "\u53E0\u52A0\u5757\u4E0B";
    /*湿地 */
    BlockType[BlockType["\u94A5\u5319\u5757"] = 2] = "\u94A5\u5319\u5757";
    /*山峰 */
    BlockType[BlockType["\u4E0A\u9501\u5757"] = 3] = "\u4E0A\u9501\u5757";
    /*终点地块 */
    BlockType[BlockType["\u51BB\u7ED3\u5757"] = 4] = "\u51BB\u7ED3\u5757";
    /*息壤 */
    BlockType[BlockType["\u661F\u661F\u5757"] = 5] = "\u661F\u661F\u5757";
    /*加固 */
    BlockType[BlockType["\u70B8\u5F39\u5757"] = 6] = "\u70B8\u5F39\u5757";
    /*加固 */
    BlockType[BlockType["\u6C34\u5E73\u5757"] = 7] = "\u6C34\u5E73\u5757";
    /*加固 */
    BlockType[BlockType["\u5782\u76F4\u5757"] = 8] = "\u5782\u76F4\u5757";
    /*加固 */
    BlockType[BlockType["\u7C98\u5408\u5757"] = 9] = "\u7C98\u5408\u5757";
    /*加固 */
    BlockType[BlockType["\u53E0\u52A0\u5757\u4E0A"] = 10] = "\u53E0\u52A0\u5757\u4E0A";
})(BlockType = exports.BlockType || (exports.BlockType = {}));
var BlockColor;
(function (BlockColor) {
    /*起点地块 */
    BlockColor[BlockColor["\u7D2B\u8272"] = 0] = "\u7D2B\u8272";
    /*湿地 */
    BlockColor[BlockColor["\u9EC4\u8272"] = 1] = "\u9EC4\u8272";
    /*山峰 */
    BlockColor[BlockColor["\u7EFF\u8272"] = 2] = "\u7EFF\u8272";
    /*终点地块 */
    BlockColor[BlockColor["\u84DD\u8272"] = 3] = "\u84DD\u8272";
    /*息壤 */
    BlockColor[BlockColor["\u7C89\u8272"] = 4] = "\u7C89\u8272";
    /*加固 */
    BlockColor[BlockColor["\u6A58\u9EC4\u8272"] = 5] = "\u6A58\u9EC4\u8272";
    /*加固 */
    BlockColor[BlockColor["\u9752\u8272"] = 6] = "\u9752\u8272";
    /*加固 */
    BlockColor[BlockColor["\u767D\u8272"] = 7] = "\u767D\u8272";
    /*加固 */
    BlockColor[BlockColor["\u7EA2\u8272"] = 8] = "\u7EA2\u8272";
    /*加固 */
    BlockColor[BlockColor["\u7070\u8272"] = 9] = "\u7070\u8272";
})(BlockColor = exports.BlockColor || (exports.BlockColor = {}));
var PathType;
(function (PathType) {
    PathType["err"] = "err";
    PathType["up"] = "up";
    PathType["down"] = "down";
    PathType["left"] = "left";
    PathType["right"] = "right";
    PathType["up_left"] = "up_left";
    PathType["up_right"] = "up_right";
    PathType["down_left"] = "down_left";
    PathType["down_right"] = "down_right";
    PathType["left_up"] = "left_up";
    PathType["left_down"] = "left_down";
    PathType["right_up"] = "right_up";
    PathType["right_down"] = "right_down";
})(PathType = exports.PathType || (exports.PathType = {}));
var Block = /** @class */ (function (_super) {
    __extends(Block, _super);
    function Block() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        // 新增缓存变量
        _this.moveInterval = 0; // 约 60 FPS 
        _this.lastMoveTime = 0; // 上下两个值来调节跟手，一个是时间轴，一个是距离轴
        _this.maxSpeed = 300; //  最大移动距离
        // private otherCollider: cc.Collider = null;
        // @property({
        //     tooltip: '碰撞形状，None就是无敌，不参与碰撞',
        //     type: cc.Enum(BlockType),
        //     // default: BlockType.Nomal,
        //     displayName: '碰撞形状'
        // })
        _this.type = BlockType.普通块;
        _this.color = BlockColor.紫色;
        _this.heng = 1;
        _this.shu = 1;
        _this.ice_SpriteFrame = null;
        // LIFE-CYCLE CALLBACKS:
        // @property(cc.SpriteAtlas)
        // UI: cc.SpriteAtlas = null;
        _this.initialTouchOffset = null;
        _this.offsetTolerance = 100; // 偏移容忍度; 
        _this.touchPoint = null; //触摸点
        _this.isTouch = false; //是否触摸
        _this.posX = 0; //地图块的X坐标
        _this.posY = 0; //地图块的Y坐标
        _this.moveLeft = true; //是否可以左移;
        _this.moveRight = true; //是否可以右移;
        _this.moveUp = true; //是否可以上移;
        _this.moveDown = true; //是否可以下移;
        _this.moveCorner = 0; //是否碰撞角落
        _this.moveY = 0; //是否可以上下移动;
        _this.moveX = 0; //是否可以左右移动;
        _this.touchPointX = 0; //触摸点X坐标;
        _this.touchPointY = 0; //触摸点Y坐标;
        _this.blockId = 0; //方块ID;
        _this.level = 0; //叠加方块层数;
        _this.pz = false;
        _this.over = false; //方块是否失效已消失
        _this.touchDelta = cc.v2(0, 0);
        _this.checkCollision = false;
        return _this;
    }
    Block.prototype.onLoad = function () {
        this.pz = false;
        this.stacking = cc.v2(0, 0);
        this.adhesive = cc.v2(0, 0);
        this.adhesiveNode = [];
        this.collider = this.node.getComponent(cc.PolygonCollider);
        this.over = false;
        this.checkCollision = false;
    };
    Block.prototype.start = function () {
    };
    Block.prototype.jsonDeepClone = function (obj) {
        return JSON.parse(JSON.stringify(obj));
    };
    //createAd 为是否创建粘合快图片
    Block.prototype.init = function (block_Info, posX, posY, node, createAd) {
        var _this = this;
        this.block_Info = this.jsonDeepClone(block_Info);
        if (node)
            this.block_Info.node = node;
        this.type = block_Info.type;
        this.color = block_Info.color;
        this.blockId = block_Info.id;
        // if(posX&&posY){
        //     this.posX = posX;
        //     this.posY = posY;
        // }
        // console.log("方块层级",this.node.zIndex);
        this.initColor();
        this.initType();
        this.initBlocks();
        if (this.type != BlockType.叠加块上) {
            this.node.on(cc.Node.EventType.TOUCH_START, this.touchStart, this);
            this.node.on(cc.Node.EventType.TOUCH_MOVE, this.touchMove, this);
            this.node.on(cc.Node.EventType.TOUCH_CANCEL, this.touchEnd, this);
            this.node.on(cc.Node.EventType.TOUCH_END, this.touchEnd, this);
            this.node['_touchListener'].setSwallowTouches(false);
            setTimeout(function () {
                if (_this.type == BlockType.粘合块) {
                    // 计算位置偏移
                    var posOffset_1 = cc.v2(_this.node.x - _this.block_Info.node.x, _this.node.y - _this.block_Info.node.y);
                    if (createAd) {
                        if (_this.node.zIndex >= _this.block_Info.node.zIndex)
                            _this.createAdhesive();
                        else
                            _this.block_Info.node.getComponent("Block").createAdhesive();
                    }
                    var targetNames_1 = ['top', 'down', 'left', 'right'];
                    _this.block_Info.node.children.forEach(function (child) {
                        if (child instanceof cc.Node && targetNames_1.includes(child.name) && child.getComponent("lq_collide").data_string != "-1") {
                            var clonedChild = cc.instantiate(child);
                            clonedChild.getComponent("lq_collide").data_string = "-1";
                            clonedChild.parent = _this.node;
                            // 获取子节点相对于父节点的位置
                            var relativePos = child.getPosition();
                            // 调整子节点位置以保证相对位置不变
                            clonedChild.setPosition(relativePos.x - posOffset_1.x, relativePos.y - posOffset_1.y);
                        }
                    });
                    _this.adhesive = posOffset_1;
                }
            }, 100);
            var mapInfo = Map_1.default._instance.mapInfo;
            for (var i = 0; i < mapInfo.length; i++) {
                var blockRect = mapInfo[i].getBoundingBox();
                // 使用 cc.Intersection.pointInRect 方法判断点是否在矩形范围内
                var point = cc.v2(this.node.position.x - 5, this.node.position.y + 10);
                if (blockRect.contains(point)) {
                    this.posX = mapInfo[i].getComponent("MapBlock").posX;
                    this.posY = mapInfo[i].getComponent("MapBlock").posY;
                    this.setMapBlock();
                    this.level = 50 + this.posX - this.posY * 3;
                    this.node.zIndex = this.level;
                    this.node.x = mapInfo[i].x + 65;
                    this.node.y = mapInfo[i].y - 60;
                    i = 10000;
                    this.hit = new cc.Node();
                    this.hit.addComponent(cc.Sprite);
                    this.hit.parent = this.node;
                    var name = "xz_" + this.block_Info.block;
                    this.hit.getComponent(cc.Sprite).spriteFrame = this.ice_SpriteFrame._spriteFrames[name];
                    this.hit.setAnchorPoint(this.node.anchorX, this.node.anchorY);
                    this.hit.setPosition(13, -11);
                    if (this.hit.anchorX == 0.5)
                        this.hit.setPosition(0, -11);
                    else if (this.hit.anchorX == 0.33)
                        this.hit.setPosition(-13, -11);
                    else if (this.hit.anchorX == 0.66)
                        this.hit.setPosition(2, -9);
                    // this.hit.opacity = 0;
                    this.hit.active = false;
                    break;
                }
            }
        }
    };
    //初始化方块类型
    Block.prototype.initType = function () {
        var _a;
        var posConfig = cc.fx.GameConfig.PROP_INFO[this.block_Info.block];
        switch (this.type) {
            case BlockType.炸弹块:
                var boom = cc.instantiate(Map_1.default._instance.Block_Prop[this.type]);
                boom.parent = this.node;
                boom.setPosition(posConfig.pos1.x, posConfig.pos1.y);
                if ((_a = this.block_Info) === null || _a === void 0 ? void 0 : _a.boomTime)
                    boom.getComponent("Boom").init(this.block_Info.boomTime);
                break;
            case BlockType.星星块:
                var star = cc.instantiate(Map_1.default._instance.Block_Prop[this.type]);
                star.anchorX = this.node.anchorX;
                star.anchorY = this.node.anchorY;
                star.getComponent(cc.Sprite).spriteFrame = star.getComponent("Star").star_SpriteFrame.getSpriteFrame("star_" + this.block_Info.block);
                star.parent = this.node;
                star.setPosition(posConfig.pos4.x - 10, posConfig.pos4.y);
            case BlockType.钥匙块:
                var key = cc.instantiate(Map_1.default._instance.Block_Prop[this.type]);
                key.parent = this.node;
                key.setPosition(posConfig.pos1.x, posConfig.pos1.y);
                break;
            case BlockType.上锁块:
                var lock = cc.instantiate(Map_1.default._instance.Block_Prop[this.type]);
                lock.parent = this.node;
                lock.setPosition(posConfig.pos1.x, posConfig.pos1.y);
                lock.getComponent("Lock").init(this.block_Info.lockTime);
                break;
            case BlockType.冻结块:
                var freeze = cc.instantiate(Map_1.default._instance.Block_Prop[this.type]);
                freeze.parent = this.node;
                var name = "ice_" + this.block_Info.block;
                var spriteFrame = this.ice_SpriteFrame._spriteFrames[name];
                freeze.getChildByName("icon").getComponent(cc.Sprite).spriteFrame = spriteFrame;
                var freezeX = posConfig.pos6.x - (this.node.width * (this.node.anchorX - 0.5));
                var freezeY = posConfig.pos6.y + this.node.height / 2;
                freeze.setPosition(freezeX, freezeY);
                freeze.getComponent("Freeze").init(this.block_Info.freezeTime);
                freeze.getChildByName("time").setPosition(posConfig.pos5.x - 10 - freezeX, posConfig.pos5.y - 2 - freezeY);
                break;
            case BlockType.水平块:
                var horizontal = cc.instantiate(Map_1.default._instance.Block_Prop[this.type]);
                horizontal.parent = this.node;
                var heng = "heng" + this.heng;
                horizontal.getChildByName(heng).active = true;
                horizontal.setPosition(posConfig.pos2.x - 3, posConfig.pos2.y);
                break;
            case BlockType.垂直块:
                var vertical = cc.instantiate(Map_1.default._instance.Block_Prop[this.type]);
                vertical.parent = this.node;
                var shu = "shu" + this.shu;
                vertical.getChildByName(shu).active = true;
                vertical.setPosition(posConfig.pos3.x, posConfig.pos3.y);
                break;
            case BlockType.叠加块上:
                this.moveStack = false;
                this.node.off(cc.Node.EventType.TOUCH_START);
                this.node.off(cc.Node.EventType.TOUCH_MOVE);
                this.node.off(cc.Node.EventType.TOUCH_CANCEL);
                this.node.off(cc.Node.EventType.TOUCH_END);
                // this.selfBoxColliders = [];
                this.node.zIndex = 201;
                var pos = this.getStackingPos();
                this.node.setPosition(this.node.x + pos.x, this.node.y + pos.y);
                this.stacking = cc.v2(this.node.x - this.block_Info.node.x, this.node.y - this.block_Info.node.y);
                this.block_Info.node.getComponent("Block").block_Info.node = this.node;
                this.node.scaleX *= 0.7;
                this.node.scaleY *= 0.7;
                for (var i = 0; i < this.node.children.length; i++) {
                    if (this.node.children[i].name == "left" || this.node.children[i].name == "right" || this.node.children[i].name == "top" || this.node.children[i].name == "down")
                        this.node.children[i].active = false;
                }
                break;
        }
    };
    //初始化方块颜色
    Block.prototype.initColor = function () {
        var name = this.color + "color" + this.block_Info.block;
        var number = Math.floor((this.color - 1) / 2);
        var blockSpriteFrame = Map_1.default._instance.Block_Color[number]._spriteFrames;
        var spriteFrame = blockSpriteFrame[name];
        // if(this.type == BlockType.冻结块){
        //     name = "ice_"+this.block_Info.block;
        //     spriteFrame = this.ice_SpriteFrame._spriteFrames[name];
        // }
        this.node.getChildByName("icon").getComponent(cc.Sprite).spriteFrame = spriteFrame;
    };
    //创建粘合快连接处
    Block.prototype.createAdhesive = function () {
        var box = [];
        for (var i = 0; i < this.allBlocks.length; i++) {
            box.push(cc.v2(this.allBlocks[i].x + this.posX, this.allBlocks[i].y + this.posY));
        }
        var otherBox = [];
        for (var i = 0; i < this.block_Info.node.getComponent("Block").allBlocks.length; i++) {
            otherBox.push(cc.v2(this.block_Info.node.getComponent("Block").allBlocks[i].x + this.block_Info.node.getComponent("Block").posX, this.block_Info.node.getComponent("Block").allBlocks[i].y + this.block_Info.node.getComponent("Block").posY));
        }
        for (var k = 0; k < box.length; k++) {
            for (var j = 0; j < otherBox.length; j++) {
                if ((box[k].x == otherBox[j].x + 1 || box[k].x == otherBox[j].x - 1) && (box[k].y == otherBox[j].y)) {
                    //在X轴 相邻
                    var left = box[k].x == otherBox[j].x + 1 ? "left" : "right";
                    this.addAdhesive(left, box[k]);
                    otherBox.splice(j, 1);
                    j--; // 调整索引
                    if (j < 0)
                        break;
                }
                if ((box[k].y == otherBox[j].y + 1 || box[k].y == otherBox[j].y - 1) && (box[k].x == otherBox[j].x)) {
                    //在Y轴 相邻
                    var down = box[k].y == otherBox[j].y + 1 ? "down" : "up";
                    this.addAdhesive(down, box[k]);
                    otherBox.splice(j, 1);
                    j--; // 调整索引
                    if (j < 0)
                        break;
                }
            }
        }
        // let adhesive = cc.instantiate(MapConroler._instance.Block_Prop[this.type]);
    };
    //具体添加粘合快锁链方法
    Block.prototype.addAdhesive = function (diraction, box) {
        var pos = cc.v2(box.x - this.posX, box.y - this.posY);
        var adhesive = cc.instantiate(Map_1.default._instance.Block_Prop[10]);
        adhesive.parent = this.node.parent.getChildByName("Adhesive");
        // adhesive.parent = this.node.getChildByName("adhesive");
        adhesive.setPosition(120 * pos.x - 65 + this.node.x, 120 * pos.y + 60 + this.node.y);
        if (diraction == "left" || diraction == "right") {
            adhesive.getChildByName("heng").active = true;
            adhesive.getChildByName("heng").x = -60;
            if (diraction == "right")
                adhesive.getChildByName("heng").x = 60;
            adhesive.getChildByName("heng").x += 9;
            adhesive.getChildByName("heng").y += 7;
        }
        else {
            adhesive.getChildByName("shu").active = true;
            adhesive.getChildByName("shu").y = -60;
            if (diraction == "up")
                adhesive.getChildByName("shu").y = 60;
        }
        adhesive.getComponent("Adhesive").init(this.node);
        this.adhesiveNode.push(adhesive);
    };
    Block.prototype.removeAdhesive = function () {
        if (this.adhesiveNode.length > 0) {
            for (var i = 0; i < this.adhesiveNode.length; i++) {
                var adhesive = this.adhesiveNode[i];
                adhesive.getComponent("Adhesive").remove();
            }
        }
    };
    //方块落点
    Block.prototype.blockFall = function (point) {
        if (this.over == true)
            return;
        // // 假设 MapConroler 有网格信息，这里简单示例
        var mapWidth = Map_1.default._instance.mapWidth;
        var mapHeight = Map_1.default._instance.mapHeight;
        var cellSize = 120; // 每个格子的大小，根据实际情况调整
        // 计算点所在的网格坐标
        var gridX = Math.floor((point.x + (mapWidth * cellSize / 2)) / cellSize);
        var gridY = Math.floor((point.y + (mapHeight * cellSize / 2)) / cellSize);
        // 检查网格坐标是否越界
        if (gridX >= 0 && gridX < mapWidth && gridY >= 0 && gridY < mapHeight) {
            var mapBlock = Map_1.default._instance.mapBlocksWall[gridX][gridY];
            var blockRect = mapBlock.getBoundingBox();
            // 使用 cc.Intersection.pointInRect 方法判断点是否在矩形范围内
            if (blockRect.contains(point)) {
                //寻找落点
                this.removeMapBlock();
                this.posX = mapBlock.getComponent("MapBlock").posX;
                this.posY = mapBlock.getComponent("MapBlock").posY;
                this.setMapBlock();
                this.level = 50 + this.posX - this.posY * 3;
                this.node.zIndex = this.level;
                // console.log("方块层级",this.node.zIndex);
                this.node.x = mapBlock.x + 65;
                this.node.y = mapBlock.y - 60;
                if (this.type == 9) {
                    if (this.block_Info.node) {
                        this.block_Info.node.x = this.node.x - this.adhesive.x;
                        this.block_Info.node.y = this.node.y - this.adhesive.y;
                    }
                }
                else if (this.type == 1) {
                    this.block_Info.node.getComponent("Block").moveStack = false;
                    this.block_Info.node.x = this.node.x + this.block_Info.node.getComponent("Block").stacking.x;
                    this.block_Info.node.y = this.node.y + this.block_Info.node.getComponent("Block").stacking.y;
                }
            }
        }
        var jg = Map_1.default._instance.checkPass(this.node, this.allBlocks);
        if (jg >= 0) {
            this.over = true;
            Map_1.default._instance.changeState();
            this.removeBoxCollider();
            this.removeMapBlock();
            this.removeAction(jg);
        }
        else {
            Map_1.default._instance.upDoor(this.color);
            this.setVibrate("medium", 1);
            //@ts-ignore
        }
    };
    Block.prototype.removeBoxCollider = function () {
        for (var i = 0; i < this.node.children.length; i++) {
            if (this.node.children[i].name == "left" || this.node.children[i].name == "right" || this.node.children[i].name == "top" || this.node.children[i].name == "down")
                this.node.children[i].destroy();
        }
    };
    Block.prototype.removeAction = function (diraction) {
        var _this = this;
        this.node.off(cc.Node.EventType.TOUCH_START);
        this.node.off(cc.Node.EventType.TOUCH_MOVE);
        this.node.off(cc.Node.EventType.TOUCH_CANCEL);
        this.node.off(cc.Node.EventType.TOUCH_END);
        this.node.addComponent(cc.Mask);
        var self = this;
        var pos = this.node.getPosition();
        if (this.type == BlockType.叠加块下) {
            var scaleX = this.node.scaleX;
            var scaleY = this.node.scaleY;
            this.block_Info.node.getComponent("Block").restoreNomal(this.posX, this.posY, true);
            cc.tween(this.block_Info.node)
                .to(0.3, { position: pos, scaleX: scaleX > 0 ? 1 : -1, scaleY: scaleY > 0 ? 1 : -1 })
                .start();
        }
        else if (this.type == BlockType.粘合块) {
            this.removeAdhesive();
            this.block_Info.node.getComponent("Block").removeAdhesive();
            this.block_Info.node.getComponent("Block").restoreNomal(this.block_Info.node.getComponent("Block").posX, this.block_Info.node.getComponent("Block").posY, false);
            this.block_Info.node = null;
        }
        else if (this.type == BlockType.炸弹块) {
            this.node.getChildByName("boom").getComponent("Boom").stopBoom();
        }
        var time = 0.33;
        // this.node.zIndex = 0;
        var width = Math.floor(this.node.width / 120);
        var height = Math.floor(this.node.height / 120);
        setTimeout(function () {
            cc.fx.AudioManager._instance.playEffect("xiaochu", null);
        }, 300);
        this.setVibrate("light", 3);
        if (diraction == 0) {
            time = 0.33 * height;
            // time = 0.99;
            for (var i = 0; i < this.node.children.length; i++) {
                cc.tween(this.node.children[i])
                    .to(time, { y: this.node.children[i].y + this.node.children[0].height })
                    .start();
            }
        }
        else if (diraction == 1) {
            time = 0.33 * height;
            // time = 0.99
            for (var i = 0; i < this.node.children.length; i++) {
                cc.tween(this.node.children[i])
                    .to(time, { y: this.node.children[i].y - this.node.children[0].height })
                    .start();
            }
        }
        else if (diraction == 2) {
            time = 0.33 * width;
            // time = 0.99
            for (var i = 0; i < this.node.children.length; i++) {
                cc.tween(this.node.children[i])
                    .to(time, { x: this.node.children[i].x - this.node.children[0].width })
                    .start();
            }
        }
        else if (diraction == 3) {
            time = 0.33 * width;
            // time = 0.99
            for (var i = 0; i < this.node.children.length; i++) {
                cc.tween(this.node.children[i])
                    .to(time, { x: this.node.children[i].x + this.node.children[0].width })
                    .start();
            }
        }
        setTimeout(function () {
            var tempColor = _this.color;
            setTimeout(function () {
                Map_1.default._instance.upDoor(tempColor);
            }, 250);
            Map_1.default._instance.nextLevel();
            _this.node.active = false;
            _this.node.removeFromParent();
            // this.node.active = false;
            // this.node.removeFromParent();
        }, time * 1000);
    };
    Block.prototype.touchStart = function (event) {
        if (this.over || Map_1.default._instance.gameOver)
            return;
        // 返回世界坐标
        var touchLoc = event.getLocation();
        // https://docs.cocos.com/creator/api/zh/classes/Intersection.html 检测辅助类
        // let pos = this.collider.world.points
        if (!this.collider.world) {
            return;
        }
        // 判断触摸点是否在多边形内
        if (cc.Intersection.pointInPolygon(touchLoc, this.collider.world.points)) {
            if (Map_1.default._instance.hammer) {
                this.eliminate();
                this.isTouch = false;
                Map_1.default._instance.hammerMask.active = false;
                Map_1.default._instance.node.parent.getChildByName("Bottom").getChildByName("destroyBtn").getComponent("btnControl").setTouch(true);
                return false;
            }
            if (this.type != BlockType.上锁块 && this.type != BlockType.冻结块) {
                Map_1.default._instance.startUpdate();
                cc.fx.AudioManager._instance.playEffect("hit", null);
                this.node.zIndex = 200;
                if (this.type == 9) {
                    if (this.block_Info.node) {
                        this.block_Info.node.zIndex = 200;
                        this.block_Info.node.getComponent("Block").hit.active = true;
                        Map_1.default._instance.downDoor(this.block_Info.node.getComponent("Block").color, this.block_Info.node.getComponent("Block").type);
                    }
                }
                else if (this.type == 1) {
                    this.block_Info.node.getComponent("Block").moveStack = true;
                }
                var touchPoint = event.getLocation();
                var local = this.node.parent.convertToNodeSpaceAR(touchPoint);
                this.touchPointX = local.x;
                this.touchPointY = local.y;
                this.moveLeft = this.moveRight = this.moveUp = this.moveDown = true;
                this.isTouch = true;
                this.moveCorner = 0;
                this.relative_Position = cc.v2(this.node.x - local.x, this.node.y - local.y);
                Map_1.default._instance.changeRiseFall(this.color, true);
                Map_1.default._instance.downDoor(this.color, this.type);
                this.setVibrate("light", 1);
                if (this.hit)
                    this.hit.active = true;
                return true;
            }
            else {
                this.isTouch = false;
                return false;
            }
        }
        else {
            this.isTouch = false;
            return false;
        }
    };
    Block.prototype.touchEnd = function (event) {
        if (Map_1.default._instance.gameOver)
            return;
        if (this.isTouch) {
            this.touchDelta = cc.v2(0, 0);
            this.checkCollision = false;
            Map_1.default._instance.changeRiseFall(this.color, false);
            cc.fx.AudioManager._instance.playEffect("down", null);
            Map_1.default._instance.removeOneBlock();
            this.isTouch = false;
            this.node.zIndex = this.level;
            this.hit.active = false;
            if (this.type == 9) {
                if (this.block_Info.node) {
                    this.block_Info.node.getComponent("Block").hit.active = false;
                    // this.block_Info.node.getComponent("Block").isTouch = false;
                }
            }
            this.touchPoint = event.getLocation();
            var local = cc.v2(this.node.x - 50, this.node.y + 50);
            if (this.type != 10) {
                //@ts-ignore
                this.blockFall(local);
                if (this.type == 9) {
                    if (this.block_Info.node) {
                        var localTemp = cc.v2(this.block_Info.node.x - 50, this.block_Info.node.y + 50);
                        this.block_Info.node.getComponent("Block").blockFall(localTemp);
                    }
                }
            }
            this.moveLeft = this.moveRight = this.moveUp = this.moveDown = true;
        }
    };
    Block.prototype.touchMove = function (event) {
        if (Map_1.default._instance.gameOver)
            return;
        // const currentTime = Date.now();
        // // 如果距离上次移动时间小于间隔时间，直接返回
        // if (currentTime - this.lastMoveTime < this.moveInterval) {
        //     return;
        // }
        // this.lastMoveTime = currentTime;
        if (this.isTouch) {
            var delta = event.getDelta();
            var touchPoint = event.getLocation();
            var local = this.node.parent.convertToNodeSpaceAR(touchPoint);
            this.touchPointX = local.x;
            this.touchPointY = local.y;
            delta.x = this.touchPointX - this.node.x + this.relative_Position.x;
            delta.y = this.touchPointY - this.node.y + this.relative_Position.y;
            // 限制移动速度
            this.touchPointX = local.x;
            this.touchPointY = local.y;
            delta.x = this.touchPointX - this.node.x + this.relative_Position.x;
            delta.y = this.touchPointY - this.node.y + this.relative_Position.y;
            // 限制移动速度
            delta.x = Math.max(-this.maxSpeed, Math.min(this.maxSpeed, delta.x));
            delta.y = Math.max(-this.maxSpeed, Math.min(this.maxSpeed, delta.y));
            // 记录触摸移动的增量
            this.touchDelta = delta;
        }
    };
    //超出限制判断
    Block.prototype.exceeds = function (stepx, stepy) {
    };
    Block.prototype.eliminate = function () {
        var _this = this;
        //锤子状态消失
        Map_1.default._instance.pause = true;
        Map_1.default._instance.hammer = false;
        //如果方块是有特殊状态，则特殊处理
        if (this.type == BlockType.冻结块) {
            this.node.getChildByName("freeze").getComponent("Freeze").reduce(2);
            return;
        }
        else if (this.type == BlockType.上锁块) {
            this.node.getChildByName("lock").getComponent("Lock").reduce();
            return;
        }
        //如果方块可以消除
        Map_1.default._instance.blockNum -= 1;
        Map_1.default._instance.special_Treatment(this.node);
        var self = this;
        this.removeMapBlock();
        setTimeout(function () {
            var pos = _this.node.getPosition();
            if (self.type == BlockType.叠加块下) {
                var scaleX = self.node.scaleX;
                var scaleY = self.node.scaleY;
                self.block_Info.node.getComponent("Block").restoreNomal(_this.posX, _this.posY, true);
                cc.tween(self.block_Info.node)
                    .to(0.1, { position: pos, scaleX: scaleX > 0 ? 1 : -1, scaleY: scaleY > 0 ? 1 : -1 })
                    .start();
            }
            else if (self.type == BlockType.粘合块) {
                self.block_Info.node.getComponent("Block").restoreNomal(self.block_Info.node.getComponent("Block").posX, self.block_Info.node.getComponent("Block").posY, false);
            }
            else if (self.type == BlockType.炸弹块) {
                _this.node.getChildByName("boom").getComponent("Boom").stopBoom();
            }
            Map_1.default._instance.nextLevel();
            _this.node.active = false;
            _this.node.removeFromParent();
        }, 200);
    };
    Block.prototype.setVibrate = function (type, count) {
        // return;
        if (!cc.fx.GameConfig.GM_INFO.vibrateOpen) {
            return;
        }
        if (count == 1) {
            //@ts-ignore
            if (typeof wx !== 'undefined' && wx !== null) { // 判断是否在微信环境
                //@ts-ignore
                wx.vibrateShort({
                    type: type,
                    success: function () {
                    },
                    fail: function (err) {
                    }
                });
            }
            else {
            }
            return;
        }
        var time = 150;
        for (var i = 0; i < 4; i++) {
            setTimeout(function () {
                //@ts-ignore
                if (typeof wx !== 'undefined' && wx !== null) { // 判断是否在微信环境
                    //@ts-ignore
                    wx.vibrateShort({
                        type: type,
                        success: function () {
                        },
                        fail: function (err) {
                        }
                    });
                }
                else {
                }
            }, time * i);
        }
    };
    Block.prototype.setMoveCorner = function (diraction) {
        return;
    };
    Block.prototype.cmupdate = function () {
        var cm = cc.director.getCollisionManager();
        cm.update();
    };
    Block.prototype.restoreNomal = function (posX, posY, type) {
        this.type = 0;
        this.block_Info.node = null;
        this.moveStack = false;
        this.posX = posX;
        this.posY = posY;
        this.setMapBlock();
        this.level = 50 + this.posX - this.posY * 3;
        this.node.zIndex = this.level;
        var j = 1000;
        for (var i = 0; i < this.node.children.length; i++) {
            if (this.node.children[i].name == "New Node") {
                j = i;
            }
            if (i > j) {
                this.node.children[i].active = false;
            }
        }
        if (type) {
            for (var i = 0; i < this.node.children.length; i++) {
                if (this.node.children[i].name == "left" || this.node.children[i].name == "right" || this.node.children[i].name == "top" || this.node.children[i].name == "down")
                    this.node.children[i].active = true;
            }
        }
        this.node.on(cc.Node.EventType.TOUCH_START, this.touchStart, this);
        this.node.on(cc.Node.EventType.TOUCH_MOVE, this.touchMove, this);
        this.node.on(cc.Node.EventType.TOUCH_CANCEL, this.touchEnd, this);
        this.node.on(cc.Node.EventType.TOUCH_END, this.touchEnd, this);
        this.node['_touchListener'].setSwallowTouches(false);
        this.hit = new cc.Node();
        this.hit.addComponent(cc.Sprite);
        this.hit.parent = this.node;
        var name = "xz_" + this.block_Info.block;
        this.hit.getComponent(cc.Sprite).spriteFrame = this.ice_SpriteFrame._spriteFrames[name];
        this.hit.setAnchorPoint(this.node.anchorX, this.node.anchorY);
        this.hit.setPosition(13, -11);
        if (this.hit.anchorX == 0.5)
            this.hit.setPosition(0, -11);
        else if (this.hit.anchorX == 0.33)
            this.hit.setPosition(-13, -11);
        else if (this.hit.anchorX == 0.66)
            this.hit.setPosition(2, -9);
        this.hit.active = false;
    };
    //冻结状态恢复为常规状态
    Block.prototype.resetFreeze = function () {
        this.type = 0;
        this.block_Info.type = 0;
        var name = this.color + "color" + this.block_Info.block;
        var number = Math.floor((this.color - 1) / 2);
        var blockSpriteFrame = Map_1.default._instance.Block_Color[number]._spriteFrames;
        var spriteFrame = blockSpriteFrame[name];
        this.node.getChildByName("icon").getComponent(cc.Sprite).spriteFrame = spriteFrame;
    };
    Block.prototype.initBlocks = function () {
        this.allBlocks = [];
        switch (this.block_Info.block) {
            case 0:
                var pos = cc.v2(0, 0);
                this.allBlocks = [pos];
                break;
            case 1:
                var pos1 = cc.v2(0, 0);
                var pos2 = cc.v2(-1, 0);
                this.allBlocks = [pos1, pos2];
                break;
            case 2:
                var pos3 = cc.v2(0, 0);
                var pos4 = cc.v2(0, 1);
                this.allBlocks = [pos3, pos4];
                break;
            case 3:
                var pos5 = cc.v2(0, 0);
                var pos6 = cc.v2(-1, 0);
                var pos7 = cc.v2(-2, 0);
                this.allBlocks = [pos5, pos6, pos7];
                break;
            case 4:
                var pos8 = cc.v2(0, 0);
                var pos9 = cc.v2(0, 1);
                var pos10 = cc.v2(0, 2);
                this.allBlocks = [pos8, pos9, pos10];
                break;
            case 5:
                var pos11 = cc.v2(0, 0);
                var pos12 = cc.v2(-1, 0);
                var pos13 = cc.v2(-1, 1);
                var pos14 = cc.v2(0, 1);
                this.allBlocks = [pos11, pos12, pos13, pos14];
                break;
            case 6:
                var pos15 = cc.v2(0, 0);
                var pos16 = cc.v2(0, 1);
                var pos17 = cc.v2(0, 2);
                var pos18 = cc.v2(-1, 2);
                this.allBlocks = [pos15, pos16, pos17, pos18];
                break;
            case 7:
                var pos19 = cc.v2(0, 0);
                var pos20 = cc.v2(0, 1);
                var pos21 = cc.v2(-1, 1);
                var pos22 = cc.v2(-2, 1);
                this.allBlocks = [pos19, pos20, pos21, pos22];
                break;
            case 8:
                var pos23 = cc.v2(0, 0);
                var pos24 = cc.v2(-1, 0);
                var pos25 = cc.v2(-1, 1);
                var pos26 = cc.v2(-1, 2);
                this.allBlocks = [pos23, pos24, pos25, pos26];
                break;
            case 9:
                var pos27 = cc.v2(0, 0);
                var pos28 = cc.v2(-1, 0);
                var pos29 = cc.v2(-2, 0);
                var pos30 = cc.v2(0, 1);
                this.allBlocks = [pos27, pos28, pos29, pos30];
                break;
            case 10:
                var pos31 = cc.v2(0, 0);
                var pos32 = cc.v2(1, 2);
                var pos33 = cc.v2(0, 1);
                var pos34 = cc.v2(0, 2);
                this.allBlocks = [pos31, pos32, pos33, pos34];
                break;
            case 11:
                var pos35 = cc.v2(0, 0);
                var pos36 = cc.v2(2, 1);
                var pos37 = cc.v2(1, 1);
                var pos38 = cc.v2(0, 1);
                this.allBlocks = [pos35, pos36, pos37, pos38];
                break;
            case 12:
                var pos39 = cc.v2(0, 0);
                var pos40 = cc.v2(0, 1);
                var pos41 = cc.v2(0, 2);
                var pos42 = cc.v2(-1, 0);
                this.allBlocks = [pos39, pos40, pos41, pos42];
                break;
            case 13:
                var pos43 = cc.v2(0, 0);
                var pos44 = cc.v2(-1, 0);
                var pos45 = cc.v2(-2, 0);
                var pos46 = cc.v2(-2, 1);
                this.allBlocks = [pos43, pos44, pos45, pos46];
                break;
            case 14:
                var pos47 = cc.v2(0, 0);
                var pos48 = cc.v2(0, 1);
                var pos49 = cc.v2(-1, 1);
                var pos50 = cc.v2(1, 1);
                this.allBlocks = [pos47, pos48, pos49, pos50];
                break;
            case 15:
                var pos51 = cc.v2(0, 0);
                var pos52 = cc.v2(-1, 0);
                var pos53 = cc.v2(-2, 0);
                var pos54 = cc.v2(-1, 1);
                this.allBlocks = [pos51, pos52, pos53, pos54];
                break;
            case 16:
                var pos55 = cc.v2(0, 0);
                var pos56 = cc.v2(1, 1);
                var pos57 = cc.v2(0, 1);
                var pos58 = cc.v2(0, 2);
                this.allBlocks = [pos55, pos56, pos57, pos58];
                break;
            case 17:
                var pos59 = cc.v2(0, 0);
                var pos60 = cc.v2(0, 1);
                var pos61 = cc.v2(0, 2);
                var pos62 = cc.v2(-1, 1);
                this.allBlocks = [pos59, pos60, pos61, pos62];
                break;
            case 18:
                var pos63 = cc.v2(0, 0);
                var pos64 = cc.v2(0, 1);
                var pos65 = cc.v2(0, 2);
                var pos66 = cc.v2(1, 1);
                var pos67 = cc.v2(-1, 1);
                this.allBlocks = [pos63, pos64, pos65, pos66, pos67];
                break;
            case 19:
                var pos68 = cc.v2(0, 0);
                var pos69 = cc.v2(0, 1);
                var pos70 = cc.v2(-1, 0);
                this.allBlocks = [pos68, pos69, pos70];
                break;
            case 20:
                var pos71 = cc.v2(0, 0);
                var pos72 = cc.v2(-1, 0);
                var pos73 = cc.v2(-1, 1);
                this.allBlocks = [pos71, pos72, pos73];
                break;
            case 21:
                var pos74 = cc.v2(0, 0);
                var pos75 = cc.v2(0, 1);
                var pos76 = cc.v2(1, 1);
                this.allBlocks = [pos74, pos75, pos76];
                break;
            case 22:
                var pos77 = cc.v2(0, 0);
                var pos78 = cc.v2(0, 1);
                var pos79 = cc.v2(-1, 1);
                this.allBlocks = [pos77, pos78, pos79];
                break;
        }
    };
    Block.prototype.setMapBlock = function () {
        if (this.allBlocks.length > 0) {
            for (var i = 0; i < this.allBlocks.length; i++) {
                var pos = this.allBlocks[i];
                var x = this.posX + pos.x;
                var y = this.posY + pos.y;
                Map_1.default._instance.mapBlocksWall[x][y].getComponent("MapBlock").block_Id = this.node.uuid;
            }
        }
    };
    Block.prototype.removeMapBlock = function () {
        if (this.posX == 0 && this.posY == 0) {
            return;
        }
        if (this.allBlocks) {
            if (this.allBlocks.length > 0) {
                for (var i = 0; i < this.allBlocks.length; i++) {
                    if (this.allBlocks[i]) {
                        var pos = this.allBlocks[i];
                        var x = this.posX + pos.x;
                        var y = this.posY + pos.y;
                        if (Map_1.default._instance.mapBlocksWall[x][y]) {
                            if (Map_1.default._instance.mapBlocksWall[x][y].getComponent("MapBlock"))
                                Map_1.default._instance.mapBlocksWall[x][y].getComponent("MapBlock").block_Id = "";
                        }
                    }
                }
            }
        }
    };
    //叠加块，位置差异，校准位置
    Block.prototype.getStackingPos = function () {
        switch (this.node.name) {
            case "block0":
                return cc.v2(-21, 22);
            case "block1":
                return cc.v2(-36, 23);
            case "block2":
                return cc.v2(-18, 40);
            case "block3":
                return cc.v2(-59, 25);
            case "block4":
                return cc.v2(-19, 57);
            case "block5":
                return cc.v2(-36, 38);
            case "block6":
                return cc.v2(-19, 97);
            case "block7":
                return cc.v2(-19, 61);
            case "block8":
                return cc.v2(-55, 24);
            case "block9":
                return cc.v2(-20, 24);
            case "block10":
                return cc.v2(-17, 96);
            case "block11":
                return cc.v2(-17, 58);
            case "block12":
                return cc.v2(-20, 24);
            case "block13":
                return cc.v2(-92, 25);
            case "block14":
                return cc.v2(-18, 60);
            case "block15":
                return cc.v2(-58, 24);
            case "block16":
                return cc.v2(-20, 60);
            case "block17":
                return cc.v2(-17, 60);
            case "block18":
                return cc.v2(-17, 60);
            case "block19":
                return cc.v2(-20, 24);
            case "block20":
                return cc.v2(-54, 25);
            case "block21":
                return cc.v2(-17, 60);
            case "block22":
                return cc.v2(-17, 60);
        }
    };
    Block.prototype.update = function (dt) {
        if (this.isTouch && this.touchDelta.mag() > 0) {
            //this.moveLeft = this.moveRight = this.moveUp = this.moveDown = true;
            var delta = this.touchDelta;
            var newX = this.node.x + delta.x;
            var newY = this.node.y + delta.y;
            var distance = Math.sqrt(Math.pow(newX - this.node.x, 2) + Math.pow(newY - this.node.y, 2));
            var mag = Math.round(delta.mag());
            if (this.moveY === 1) {
                if (this.touchPointY <= this.node.y + this.node.height / 2) {
                    this.moveY = 0;
                }
            }
            else if (this.moveY === -1) {
                if (this.touchPointY >= this.node.y + this.node.height / 2) {
                    this.moveY = 0;
                }
            }
            if (this.moveX === 1) {
                if (this.touchPointX <= this.node.x - this.node.width / 2) {
                    this.moveX = 0;
                }
                else {
                }
            }
            else if (this.moveX === -1) {
                if (this.touchPointX >= this.node.x - this.node.width / 2) {
                    this.moveX = 0;
                }
                else {
                }
            }
            if (distance > 100) {
                mag = 10;
                var speedScale = 0.5;
                delta.x *= speedScale;
                delta.y *= speedScale;
            }
            else {
                if (mag > 5) {
                    mag = Math.floor(mag / 5);
                }
            }
            // mag = 2;
            var stepx = delta.x / mag;
            var stepy = delta.y / mag;
            for (var index = 0; index < mag; index++) {
                this.moveCorner = 0;
                var tempX = this.node.x + stepx;
                var tempY = this.node.y + stepy;
                if (!this.checkCollision) {
                    if (this.type !== 8 && this.type !== 10) {
                        this.node.x = Math.round(tempX);
                    }
                    if (this.type !== 7 && this.type !== 10) {
                        this.node.y = Math.round(tempY);
                    }
                }
                else {
                    var isXMain = Math.abs(stepx) > Math.abs(stepy);
                    if (isXMain) {
                        if (this.node.x > tempX) {
                            if (this.moveLeft && this.moveX === 0 && this.type !== 8 && this.type !== 10) {
                                this.node.x = tempX;
                            }
                            if (this.moveX !== 0) {
                                this.moveX = 0;
                            }
                        }
                        else if (this.node.x <= tempX) {
                            if (this.moveRight && this.moveX === 0 && this.type !== 8 && this.type !== 10) {
                                this.node.x = tempX;
                            }
                            if (this.moveX !== 0) {
                                this.moveX = 0;
                            }
                        }
                        if (this.node.y > tempY) {
                            if (this.moveDown && this.moveY === 0 && this.type !== 7 && this.type !== 10) {
                                this.node.y = tempY;
                            }
                            if (this.moveY !== 0) {
                                this.moveY = 0;
                            }
                        }
                        else if (this.node.y <= tempY) {
                            if (this.moveUp && this.moveY === 0 && this.type !== 7 && this.type !== 10) {
                                this.node.y = tempY;
                            }
                            if (this.moveY !== 0) {
                                this.moveY = 0;
                            }
                        }
                    }
                    else {
                        if (this.node.y > tempY) {
                            if (this.moveDown && this.moveY === 0 && this.type !== 7 && this.type !== 10) {
                                this.node.y = tempY;
                            }
                            if (this.moveY !== 0) {
                                this.moveY = 0;
                            }
                        }
                        else if (this.node.y <= tempY) {
                            if (this.moveUp && this.moveY === 0 && this.type !== 7 && this.type !== 10) {
                                this.node.y = tempY;
                            }
                            if (this.moveY !== 0) {
                                this.moveY = 0;
                            }
                        }
                        if (this.node.x > tempX) {
                            if (this.moveLeft && this.moveX === 0 && this.type !== 8 && this.type !== 10) {
                                this.node.x = tempX;
                            }
                            if (this.moveX !== 0) {
                                this.moveX = 0;
                            }
                        }
                        else if (this.node.x <= tempX) {
                            if (this.moveRight && this.moveX === 0 && this.type !== 8 && this.type !== 10) {
                                this.node.x = tempX;
                            }
                            if (this.moveX !== 0) {
                                this.moveX = 0;
                            }
                        }
                    }
                }
                lq_collide_system_1.LQCollideSystem.update_logic(dt);
            }
            // 移动完成后重置触摸增量
            this.touchDelta = cc.v2(0, 0);
        }
        if (this.type == BlockType.叠加块上 && this.moveStack == true) {
            if (this.stacking.x != 0 || this.stacking.y != 0) {
                this.node.x = this.block_Info.node.x + this.stacking.x;
                this.node.y = this.block_Info.node.y + this.stacking.y;
            }
        }
        if (this.block_Info) {
            if (this.block_Info.node != null) {
                if (this.type == BlockType.粘合块) {
                    if (this.adhesive.x != 0 && this.adhesive.y != 0 && this.block_Info.node != null) {
                        this.block_Info.node.x = this.node.x - this.adhesive.x;
                        this.block_Info.node.y = this.node.y - this.adhesive.y;
                    }
                    if (this.isTouch == true && this.block_Info.node.getComponent("Block").isTouch == false) {
                        lq_collide_system_1.LQCollideSystem.update_logic(dt);
                        this.block_Info.node.x = this.node.x - this.adhesive.x;
                        this.block_Info.node.y = this.node.y - this.adhesive.y;
                    }
                }
            }
        }
    };
    __decorate([
        property({
            tooltip: '碰撞形状，None就是无敌，不参与碰撞',
            type: cc.Enum(BlockType),
        })
    ], Block.prototype, "type", void 0);
    __decorate([
        property({
            tooltip: '碰撞形状，None就是无敌，不参与碰撞',
            type: cc.Enum(BlockColor),
        })
    ], Block.prototype, "color", void 0);
    __decorate([
        property({
            tooltip: '横向长度',
            type: cc.Integer,
        })
    ], Block.prototype, "heng", void 0);
    __decorate([
        property({
            tooltip: '竖向长度',
            type: cc.Integer,
        })
    ], Block.prototype, "shu", void 0);
    __decorate([
        property(cc.SpriteAtlas)
    ], Block.prototype, "ice_SpriteFrame", void 0);
    Block = __decorate([
        ccclass
    ], Block);
    return Block;
}(cc.Component));
exports.default = Block;

cc._RF.pop();