
                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/__qc_index__.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);}
require('./assets/Script/CliGD');
require('./assets/Script/EndScene');
require('./assets/Script/GD');
require('./assets/Script/Global');
require('./assets/Script/Http');
require('./assets/Script/MainScene');
require('./assets/Script/Opplvdai');
require('./assets/Script/Playcontroler');
require('./assets/Script/Rank');
require('./assets/Script/SB');
require('./assets/Script/StartScene');
require('./assets/Script/boli');
require('./assets/Script/dici');
require('./assets/Script/fuhuo1');
require('./assets/Script/getP');
require('./assets/Script/hook');
require('./assets/Script/lvdai');
require('./assets/Script/run');
require('./assets/Script/runRight');
require('./assets/Script/setzIndex');
require('./assets/Script/shandian');
require('./assets/Script/stand');
require('./assets/Script/tanhuang');
require('./assets/migration/use_v2.1-2.2.1_cc.Toggle_event');

                    }
                    if (nodeEnv) {
                        __define(__module.exports, __require, __module);
                    }
                    else {
                        __quick_compile_project__.registerModuleFunc(__filename, function () {
                            __define(__module.exports, __require, __module);
                        });
                    }
                })();
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/GD.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, '3b92asAQBZGJZpKL/qRD3e3', 'GD');
// Script/GD.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 });
var Global_1 = require("./Global");
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var GD = /** @class */ (function (_super) {
    __extends(GD, _super);
    function GD() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        /**
         * 落脚点类型 1：向左传送带
         */
        _this.KIND_FootHold = 0;
        /**
         * player是否落在落脚点上，默认false，没有
         */
        _this.isHold = false;
        _this.NodeH = 70;
        _this.GoUp = false;
        _this.main = null;
        /**
         * 落脚点对应动画
         */
        _this.Ani = null;
        _this.AniState = null;
        _this.LifeDing = null;
        _this.gainSc = false;
        return _this;
    }
    GD.prototype.onLoad = function () {
        this.node.y = -500;
        // this.KIND_FootHold==7
    };
    GD.prototype.start = function () {
        var moveStartT = 0;
        var moveEndT = 0;
        if (this.KIND_FootHold == 1) {
            // this.KIND_FootHold = 1;   
            this.node.x = (Math.random() * 2 - 1) * 140;
        }
        if (this.KIND_FootHold == 7) {
            // this.KIND_FootHold = 7;
            this.node.x = (Math.random() * 2 - 1) * 140;
        }
        if (this.KIND_FootHold == 1) {
            this.node.getChildByName("gd").getComponent("CliGD").enabled = false;
        }
        else {
            this.node.getChildByName("gd").getComponent("CliGD").enabled = true;
        }
        this.LifeDing = this.main.LifeDing.children;
    };
    GD.prototype.update = function (dt) {
        // console.log(Global.instance.CollisionFlag);
        var self = this;
        // console.log("状态："+ self.node.active+"，位置："+self.node.x);
        if (Global_1.default.instance.OverFlag) {
            self.enabled = false;
        }
        else {
            this.node.active = true;
            if (this.node.isHold) {
                Global_1.default.instance.CollisionFlag = true;
                Global_1.default.instance.TheHolder = this.node;
                this.node.y += Global_1.default.instance.FHFallSpeed;
            }
            else {
                this.node.y += Global_1.default.instance.FHFallSpeed;
            }
            if (this.node.y > 360) {
                if (this.node.isHold) {
                    this.node.isHold = false;
                    Global_1.default.instance.CollisionFlag = false;
                }
                this.node.destroy();
            }
        }
    };
    GD.prototype.MoveThis = function () {
    };
    /**
     * 初始化函数
     * @param main 主场景
     */
    GD.prototype.init = function (main, kind) {
        this.main = main;
        this.KIND_FootHold = kind;
    };
    /**
     * 获取落脚点类型
     */
    GD.prototype.getKind = function () {
        return this.KIND_FootHold;
    };
    GD.prototype.onCollisionEnter = function (other, self) {
        var rootself = this;
        if (rootself.GoUp) {
            return;
        }
        if (other.tag == 111) {
            // console.log("我被撞到了");
            rootself.main.Score();
            rootself.gainSc = true;
            rootself.GoUp = true;
            return;
        }
        Global_1.default.instance.TheHolder = this.node;
        Global_1.default.instance.KIND_FootHold = this.KIND_FootHold;
        Global_1.default.instance.CollisionFlag = true;
        this.node.isHold = true;
        // this.main.Score();
    };
    __decorate([
        property(Boolean)
    ], GD.prototype, "isHold", void 0);
    __decorate([
        property(Number)
    ], GD.prototype, "NodeH", void 0);
    GD = __decorate([
        ccclass
    ], GD);
    return GD;
}(cc.Component));
exports.default = GD;

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, 8764 characters]
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/Global.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, 'dd28di+k5ZMPKxLRb2fb7ea', 'Global');
// Script/Global.ts

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Global = /** @class */ (function () {
    function Global() {
        this.StartNode = null;
        /**
         * 主场景节点
         */
        this.MainNode = null;
        /**
         * 落脚点碰撞标志，默认未碰撞，false
         */
        this.CollisionFlag = false;
        /**
         * 顶碰撞标准，默认未碰撞，false
         */
        this.CollisionWithDing = false;
        /**
         * 落脚点碰撞标签
         */
        this.KIND_FootHold = 0;
        /**
         * player初始下落速度,8.5px/帧
         */
        this.InitSpeed = 8.5;
        /**
         * player移动速度,1px/帧
         */
        this.moveSpeed = 10;
        /**
         * 落脚点移动速度
         */
        this.FHFallSpeed = 2;
        /**
         * 剩余命数
         */
        this.reLife = new Array();
        /**
         * 受到伤害标志
         */
        this.Injured = false;
        /**
         * 失败标志
         */
        this.OverFlag = false;
        /**
         * 等级增加标志位,0表示未增加，当前为1级
         */
        this.LevelAddFlag = 1;
        /**
         * 本地分数存储
         */
        this.LocalScore = {
            BestScore: 0,
            SecondScore: 0,
            ThirdScore: 0,
            CurrentScore: 0,
            length: 3,
        };
        /**
         * 远程分数存储
         */
        this.remoteScore = new Array();
        /**
         * 网络连接标志位
         */
        this.NetStatus = false;
        /**
         * stop Animations falg;
         */
        this.AniFalg = false;
        /**
         * info
         */
        this.USERINFO = {
            userId: "",
            uTim: Number,
            score: 0,
        };
        /**
         * player排行
         */
        this.MyRank = null;
        this.LorR = 0; //0 for right
    }
    ;
    /**
     * return the local score
     */
    Global.prototype.getLocalScore = function () {
        return this.LocalScore;
    };
    /**
     * return the remote score
     */
    Global.prototype.getRemoteScore = function () {
        return this.remoteScore;
    };
    Global.prototype.setRemoteScore = function (score) {
        this.remoteScore = score;
    };
    /**
     * 开始场景节点获取
     */
    Global.prototype.getSN = function () {
        return this.StartNode;
    };
    /**
     *
     * @param sn 开始场景节点
     */
    Global.prototype.setSN = function (sn) {
        this.StartNode = sn;
    };
    /**
     * 主场景节点获取
     */
    Global.prototype.getMN = function () {
        return this.MainNode;
    };
    /**
     *
     * @param mn 主场景节点
     */
    Global.prototype.setMN = function (mn) {
        this.MainNode = mn;
    };
    /**
         * 获取玩家信息
         */
    Global.prototype.GetUSer = function () {
        return this.USERINFO;
    };
    /**
     * 设置玩家信息
     * @param user 玩家
     */
    Global.prototype.SetUser = function (user) {
        this.USERINFO = user;
    };
    /**
    * 获取个人排行
    */
    Global.prototype.GetR = function () {
        return this.MyRank;
    };
    /**
     * 设置个人排行
     * @param r 排行
     */
    Global.prototype.SetR = function (r) {
        this.MyRank = r;
    };
    /**
    * 获取排行分数
    */
    Global.prototype.GetS = function () {
        return this.remoteScore;
    };
    /**
     * 设置排行分数
     * @param s 分数
     */
    Global.prototype.SetS = function (s) {
        this.remoteScore = s;
    };
    Global.instance = new Global(); //全局下不可少
    return Global;
}());
exports.default = Global;
/**
 * 这里应当添加当前局分数存储，
 * 只需要游戏最高分
 * 从服务器获取的分数也是先与本地分数对比，交换，
 * 拿到最高分，上传；
 * 之后刷新排行榜
 */

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, 8120 characters]
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/migration/use_v2.1-2.2.1_cc.Toggle_event.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, 'feecb1//ZlFGa+F7XBGUNj2', 'use_v2.1-2.2.1_cc.Toggle_event');
// migration/use_v2.1-2.2.1_cc.Toggle_event.js

"use strict";

/*
 * This script is automatically generated by Cocos Creator and is only used for projects compatible with the v2.1.0 ～ 2.2.1 version.
 * You do not need to manually add this script in any other project.
 * If you don't use cc.Toggle in your project, you can delete this script directly.
 * If your project is hosted in VCS such as git, submit this script together.
 *
 * 此脚本由 Cocos Creator 自动生成，仅用于兼容 v2.1.0 ~ 2.2.1 版本的工程，
 * 你无需在任何其它项目中手动添加此脚本。
 * 如果你的项目中没用到 Toggle，可直接删除该脚本。
 * 如果你的项目有托管于 git 等版本库，请将此脚本一并上传。
 */
if (cc.Toggle) {
  // Whether to trigger 'toggle' and 'checkEvents' events when modifying 'toggle.isChecked' in the code
  // 在代码中修改 'toggle.isChecked' 时是否触发 'toggle' 与 'checkEvents' 事件
  cc.Toggle._triggerEventInScript_isChecked = true;
}

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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFzc2V0c1xcbWlncmF0aW9uXFx1c2VfdjIuMS0yLjIuMV9jYy5Ub2dnbGVfZXZlbnQuanMiXSwibmFtZXMiOlsiY2MiLCJUb2dnbGUiLCJfdHJpZ2dlckV2ZW50SW5TY3JpcHRfaXNDaGVja2VkIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7OztBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQSxJQUFJQSxFQUFFLENBQUNDLE1BQVAsRUFBZTtFQUNYO0VBQ0E7RUFDQUQsRUFBRSxDQUFDQyxNQUFILENBQVVDLCtCQUFWLEdBQTRDLElBQTVDO0FBQ0giLCJzb3VyY2VSb290IjoiLyIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBUaGlzIHNjcmlwdCBpcyBhdXRvbWF0aWNhbGx5IGdlbmVyYXRlZCBieSBDb2NvcyBDcmVhdG9yIGFuZCBpcyBvbmx5IHVzZWQgZm9yIHByb2plY3RzIGNvbXBhdGlibGUgd2l0aCB0aGUgdjIuMS4wIO+9niAyLjIuMSB2ZXJzaW9uLlxuICogWW91IGRvIG5vdCBuZWVkIHRvIG1hbnVhbGx5IGFkZCB0aGlzIHNjcmlwdCBpbiBhbnkgb3RoZXIgcHJvamVjdC5cbiAqIElmIHlvdSBkb24ndCB1c2UgY2MuVG9nZ2xlIGluIHlvdXIgcHJvamVjdCwgeW91IGNhbiBkZWxldGUgdGhpcyBzY3JpcHQgZGlyZWN0bHkuXG4gKiBJZiB5b3VyIHByb2plY3QgaXMgaG9zdGVkIGluIFZDUyBzdWNoIGFzIGdpdCwgc3VibWl0IHRoaXMgc2NyaXB0IHRvZ2V0aGVyLlxuICpcbiAqIOatpOiEmuacrOeUsSBDb2NvcyBDcmVhdG9yIOiHquWKqOeUn+aIkO+8jOS7heeUqOS6juWFvOWuuSB2Mi4xLjAgfiAyLjIuMSDniYjmnKznmoTlt6XnqIvvvIxcbiAqIOS9oOaXoOmcgOWcqOS7u+S9leWFtuWug+mhueebruS4reaJi+WKqOa3u+WKoOatpOiEmuacrOOAglxuICog5aaC5p6c5L2g55qE6aG555uu5Lit5rKh55So5YiwIFRvZ2dsZe+8jOWPr+ebtOaOpeWIoOmZpOivpeiEmuacrOOAglxuICog5aaC5p6c5L2g55qE6aG555uu5pyJ5omY566h5LqOIGdpdCDnrYnniYjmnKzlupPvvIzor7flsIbmraTohJrmnKzkuIDlubbkuIrkvKDjgIJcbiAqL1xuXG5pZiAoY2MuVG9nZ2xlKSB7XG4gICAgLy8gV2hldGhlciB0byB0cmlnZ2VyICd0b2dnbGUnIGFuZCAnY2hlY2tFdmVudHMnIGV2ZW50cyB3aGVuIG1vZGlmeWluZyAndG9nZ2xlLmlzQ2hlY2tlZCcgaW4gdGhlIGNvZGVcbiAgICAvLyDlnKjku6PnoIHkuK3kv67mlLkgJ3RvZ2dsZS5pc0NoZWNrZWQnIOaXtuaYr+WQpuinpuWPkSAndG9nZ2xlJyDkuI4gJ2NoZWNrRXZlbnRzJyDkuovku7ZcbiAgICBjYy5Ub2dnbGUuX3RyaWdnZXJFdmVudEluU2NyaXB0X2lzQ2hlY2tlZCA9IHRydWU7XG59XG4iXX0=
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/Playcontroler.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, 'bd769BizYREq7pMZmW+fkhf', 'Playcontroler');
// Script/Playcontroler.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 });
var Global_1 = require("./Global");
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var Playcontroler = /** @class */ (function (_super) {
    __extends(Playcontroler, _super);
    function Playcontroler() {
        // LIFE-CYCLE CALLBACKS:
        var _this = _super !== null && _super.apply(this, arguments) || this;
        // parent:cc.Node = null;
        _this.MainScene = null;
        return _this;
    }
    Playcontroler.prototype.onLoad = function () {
        // this.parent = this.node.parent;
        this.MainScene = Global_1.default.instance.getMN();
    };
    Playcontroler.prototype.start = function () {
    };
    Playcontroler.prototype.update = function (dt) {
        if (Global_1.default.instance.OverFlag) {
            this.enabled = false;
        }
        else {
            if (!Global_1.default.instance.CollisionFlag) {
                this.node.y -= Global_1.default.instance.InitSpeed;
            }
            else {
                var name = Global_1.default.instance.TheHolder.name;
                if (name == "") {
                    return;
                }
                this.node.y = Global_1.default.instance.TheHolder.y
                    + Global_1.default.instance.TheHolder.getComponent(name).NodeH - 10; //here ,this way isnot a good Processing method,should be optimizated
            }
        }
        if (Global_1.default.instance.CollisionWithDing) {
            this.node.stopAllActions();
            Global_1.default.instance.CollisionWithDing = false;
            Global_1.default.instance.CollisionFlag = false;
        }
    };
    /**
     * player与墙壁的碰撞检测
     * @param other 被撞物体
     * @param self 碰撞体
     */
    Playcontroler.prototype.onCollisionEnter = function (other, self) {
        var rootSelf = this;
        switch (other.node.name) {
            case "Bg_0CollisionR": {
                self.node.x = 180;
                break;
            }
            case "Bg_0CollisionL": {
                self.node.x = -180;
                break;
            }
            case "Bg_1CollisionR": {
                self.node.x = 180;
                break;
            }
            case "Bg_1CollisionL": {
                self.node.x = -180;
                break;
            }
            // case "tanhuang":{
            //     if(other.node.x+75>self.node.x&&other.node.x-75<self.node.x){
            //         let main = Global.instance.getMN();
            //         main.getChildByName("output").getComponent(cc.Label).string = "tanhuang";
            //     }
            // }
            case "ding": {
                Global_1.default.instance.CollisionWithDing = true;
                self.node.stopAllActions();
                rootSelf.LifeZero();
                Global_1.default.instance.CollisionFlag = false;
                self.node.getComponent(cc.BoxCollider).enabled = false;
                rootSelf.scheduleOnce(function (err) {
                    self.node.getComponent(cc.BoxCollider).enabled = true;
                }, 0.3);
                break;
            }
            default: {
                // this.MainScene.getComponent("MainScene").Score();//得分
                break;
            }
        }
    };
    Playcontroler.prototype.LifeZero = function () {
        var main = Global_1.default.instance.getMN();
        var lifeChil = main.getChildByName("BgNode").getChildByName("LifeDing").children;
        var life = new Array();
        var lifeNum = 0;
        for (var i = 0; i < lifeChil.length; i++) {
            if (lifeChil[i].name == "lifeBG") {
                life.push(lifeChil[i]);
            }
        }
        for (var i = 0; i < life.length; i++) {
            if (life[i].active) {
                lifeNum++;
            }
        }
        if (lifeNum == 0) {
            return;
        }
    };
    Playcontroler = __decorate([
        ccclass
    ], Playcontroler);
    return Playcontroler;
}(cc.Component));
exports.default = Playcontroler;
/**
 * 1.下落速度加快；
 * 2.玻璃：先停一会在碎掉；
 * 3.传送带速度快一点；
 * 4.
 */ 

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, 9200 characters]
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/Http.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, 'a2af0lfNIRPj6O7NvL1gMR1', 'Http');
// Script/Http.ts

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Global_1 = require("./Global");
var URL = "https://www.19960909.com";
// 39.98.43.215:9000;
// let URL = "http://192.168.3.137:9001"
var Http = /** @class */ (function () {
    function Http() {
    }
    Http.sendRequest = function (path, data, handler, extraUrl) {
        return;
        var xhr = new XMLHttpRequest();
        xhr.timeout = 5000;
        var str = "?msg=" + JSON.stringify(data);
        // for(var k in data){
        //     if(str != "?"){
        //         str += "&";
        //     }
        //     str += k + "=" + data[k];
        // }
        if (extraUrl == null) {
            extraUrl = Http.url;
        }
        var requestURL = extraUrl + path + encodeURI(str);
        console.log("RequestURL:" + requestURL);
        xhr.open("GET", requestURL, true);
        if (cc.sys.isNative) {
            xhr.setRequestHeader("Accept-Encoding", "gzip,deflate");
            xhr.setRequestHeader("contentType", "text/html;charset=UTF-8");
        }
        xhr.onreadystatechange = function () {
            if (xhr.readyState === 4 && (xhr.status >= 200 && xhr.status < 300)) {
                Global_1.default.instance.NetStatus = true;
                //console.log("http res("+ xhr.responseText.length + "):" + xhr.responseText);
                try {
                    console.log("------------------1");
                    var ret = JSON.parse(xhr.responseText);
                    if (handler !== null) {
                        handler(ret);
                    } /* code */
                }
                catch (e) {
                    console.log("err:" + e);
                    //handler(null);
                }
                finally {
                    // if(cc.vv && cc.vv.wc){
                    // //       cc.vv.wc.hide();    
                    // }
                }
            }
            else {
                //Global.instance.NetStatus = false;
            }
        };
        // if(cc.vv && cc.vv.wc){
        //     //cc.vv.wc.show();
        // }
        try {
            xhr.send();
        }
        catch (error) {
            Global_1.default.instance.NetStatus = false;
            //console.log(" Global.instance.NetStatus "+Global.instance.NetStatus);
            console.log("HTTP    " + error);
        }
        return xhr;
    };
    ;
    Http.sendPost = function (path, data, handler, extraUrl) {
        return;
        var xhr = new XMLHttpRequest();
        xhr.timeout = 5000;
        xhr.open("POST", Http.url + path, true);
        // xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;");//缺少这句，后台无法获取参数
        xhr.setRequestHeader("Content-type", "application/json");
        xhr.onreadystatechange = function () {
            //console.info(xhr.getResponseHeader('content-type')==='application/json');
            if (xhr.readyState === 4 && (xhr.status >= 200 && xhr.status < 300)) {
                Global_1.default.instance.NetStatus = true;
                //console.log("http res("+ xhr.responseText.length + "):" + xhr.responseText);
                try {
                    console.log("------------------2");
                    var ret = JSON.parse(xhr.responseText);
                    if (handler !== null) {
                        handler(ret);
                    } /* code */
                }
                catch (e) {
                    console.log("err:" + e);
                    //handler(null);
                }
                finally {
                    // if(cc.vv && cc.vv.wc){
                    // //       cc.vv.wc.hide();    
                    // }
                }
            }
            else {
            }
        };
        //console.info(JSON.stringify(data));
        try {
            xhr.send("a=1&a=2");
        }
        catch (error) {
            Global_1.default.instance.NetStatus = false;
        }
        return xhr;
    };
    ;
    // let origin:number = 0;
    // static sessionId:number;
    // static userId:number;
    // static master_url:number;
    Http.url = URL;
    return Http;
}());
exports.default = Http;

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, 10632 characters]
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/SB.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, '51cdbAMNrBJCbNYnmDKsRnT', 'SB');
// Script/SB.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 });
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var NewClass = /** @class */ (function (_super) {
    __extends(NewClass, _super);
    function NewClass() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    // LIFE-CYCLE CALLBACKS:
    // onLoad () {}
    NewClass.prototype.start = function () {
    };
    NewClass = __decorate([
        ccclass
    ], NewClass);
    return NewClass;
}(cc.Component));
exports.default = NewClass;

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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFzc2V0c1xcU2NyaXB0XFxTQi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBTSxJQUFBLEtBQXNCLEVBQUUsQ0FBQyxVQUFVLEVBQWxDLE9BQU8sYUFBQSxFQUFFLFFBQVEsY0FBaUIsQ0FBQztBQUcxQztJQUFzQyw0QkFBWTtJQUFsRDs7SUFZQSxDQUFDO0lBVEcsd0JBQXdCO0lBRXhCLGVBQWU7SUFFZix3QkFBSyxHQUFMO0lBRUEsQ0FBQztJQVRnQixRQUFRO1FBRDVCLE9BQU87T0FDYSxRQUFRLENBWTVCO0lBQUQsZUFBQztDQVpELEFBWUMsQ0FacUMsRUFBRSxDQUFDLFNBQVMsR0FZakQ7a0JBWm9CLFFBQVEiLCJmaWxlIjoiIiwic291cmNlUm9vdCI6Ii8iLCJzb3VyY2VzQ29udGVudCI6WyJjb25zdCB7Y2NjbGFzcywgcHJvcGVydHl9ID0gY2MuX2RlY29yYXRvcjtcclxuXHJcbkBjY2NsYXNzXHJcbmV4cG9ydCBkZWZhdWx0IGNsYXNzIE5ld0NsYXNzIGV4dGVuZHMgY2MuQ29tcG9uZW50IHtcclxuXHJcblxyXG4gICAgLy8gTElGRS1DWUNMRSBDQUxMQkFDS1M6XHJcblxyXG4gICAgLy8gb25Mb2FkICgpIHt9XHJcblxyXG4gICAgc3RhcnQgKCkge1xyXG5cclxuICAgIH1cclxuXHJcbiAgICAvLyB1cGRhdGUgKGR0KSB7fVxyXG59XHJcbiJdfQ==
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/Rank.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, '1ee59EOhydJrpIHEeFr1GBu', 'Rank');
// Script/Rank.ts

"use strict";
// import Global from "../../Script/Global";
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 });
var Global_1 = require("./Global");
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var Rank = /** @class */ (function (_super) {
    __extends(Rank, _super);
    function Rank() {
        // LIFE-CYCLE CALLBACKS:
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.Ani = null;
        _this.Anistate = null;
        return _this;
    }
    Rank.prototype.onLoad = function () {
        var RemoteS = Global_1.default.instance.GetS();
        var phb = this.node.getChildByName("phb").children;
        var phbRank;
        var phbName;
        var phbFloor;
        var j = 0;
        var i = RemoteS.length - 1;
        // let len;
        var x = 0;
        var f = false;
        if (RemoteS.length >= 8) {
            x = RemoteS.length - 8;
        }
        for (; j < phb.length - x;) { //length = 8
            for (; (i >= 0 && j < RemoteS.length - x); i--) {
                phbName = phb[j].getChildByName("id").getComponent(cc.Label);
                phbRank = phb[j].getChildByName("rank").getComponent(cc.Label);
                phbFloor = phb[j].getChildByName("floor").getComponent(cc.Label);
                if (phbName.string == RemoteS[i].userId) {
                    i++;
                }
                phbName.string = RemoteS[i].userId.slice(4);
                phbRank.string = RemoteS[i].rank;
                phbFloor.string = RemoteS[i].score;
                if (phbName.string == Global_1.default.instance.GetUSer().userId.slice(4)) {
                    this.node.getChildByName("phbd1").getChildByName("myrank").getComponent(cc.Label).string
                        = phb[j].getChildByName("rank").getComponent(cc.Label).string;
                    this.node.getChildByName("phbd1").getChildByName("myfloor").getComponent(cc.Label).string
                        = phb[j].getChildByName("floor").getComponent(cc.Label).string;
                    f = true;
                }
                switch (RemoteS[i].rank) {
                    case 1: {
                        phb[j].getChildByName("model").active = true;
                        break;
                    }
                    case 2: {
                        phb[j].getChildByName("model").active = true;
                        break;
                    }
                    case 3: {
                        phb[j].getChildByName("model").active = true;
                        break;
                    }
                    default: {
                        break;
                    }
                }
                j++;
            }
            j++;
        }
        if (!f) {
            this.node.getChildByName("phbd1").getChildByName("myfloor").getComponent(cc.Label).string
                = Global_1.default.instance.getLocalScore().BestScore.toString();
            this.node.getChildByName("phbd1").getChildByName("myrank").getComponent(cc.Label).string
                = Global_1.default.instance.GetR();
        }
    };
    Rank.prototype.start = function () {
    };
    Rank.prototype.update = function (dt) {
    };
    /**
     * close the rank Scene and load the start scene.
     */
    Rank.prototype.CloseRank = function () {
        console.log("this button is used to close this rank Scene");
        this.destroy();
        Global_1.default.instance.OverFlag = false;
        cc.director.loadScene("StartScene");
    };
    Rank = __decorate([
        ccclass
    ], Rank);
    return Rank;
}(cc.Component));
exports.default = Rank;
/**
 * 这里也需要修改：player的分数不在8名之内，
 * 需要读取player的名次。
 */

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, 9256 characters]
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/boli.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, 'b589cT4kUVCI5/47LSUUTiR', 'boli');
// Script/boli.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 });
var Global_1 = require("./Global");
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var boli = /** @class */ (function (_super) {
    __extends(boli, _super);
    function boli() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        /**
         * 落脚点类型 5：玻璃
         */
        _this.KIND_FootHold = 5;
        /**
         * player是否落在落脚点上，默认false，没有
         */
        _this.isHold = false;
        _this.NodeH = 40;
        _this.main = null;
        /**
         * 落脚点对应动画
         */
        _this.Ani = null;
        _this.AniState = null;
        _this.gainSc = false;
        return _this;
    }
    boli.prototype.onLoad = function () {
        this.node.y = -500;
        this.node.x = (Math.random() * 2 - 1) * 140;
        this.Ani = this.node.getComponent(cc.Animation);
    };
    boli.prototype.start = function () {
    };
    boli.prototype.update = function (dt) {
        var self = this;
        if (Global_1.default.instance.OverFlag) {
            self.enabled = false;
        }
        else {
            this.node.active = true;
            this.node.y += Global_1.default.instance.FHFallSpeed;
            if (this.node.isHold) {
                Global_1.default.instance.CollisionFlag = true;
                Global_1.default.instance.TheHolder = this.node;
            }
            if (this.node.y > 360) {
                if (this.node.isHold) {
                    this.node.isHold = false;
                    Global_1.default.instance.CollisionFlag = false;
                }
                this.node.destroy();
            }
        }
    };
    /**
     * 初始化函数
     * @param main 主场景
     */
    boli.prototype.init = function (main) {
        this.main = main;
    };
    /**
     * 获取落脚点类型
     */
    boli.prototype.getKind = function () {
        return this.KIND_FootHold;
    };
    boli.prototype.onCollisionEnter = function (other, self) {
        // let spawn;
        var rootself = this;
        Global_1.default.instance.KIND_FootHold = this.KIND_FootHold;
        Global_1.default.instance.TheHolder = this.node;
        self.node.isHold = true;
        Global_1.default.instance.CollisionFlag = true;
        if (other.tag == 111) {
            console.log("我被撞到了");
            rootself.main.Score();
            rootself.gainSc = true;
            return;
        }
        // this.main.Score();
        this.scheduleOnce(function () {
            this.AniState = this.Ani.play("boli");
            rootself.node.isHold = false;
            Global_1.default.instance.CollisionFlag = false;
            self.destroy();
        }, 0.5);
    };
    __decorate([
        property(Boolean)
    ], boli.prototype, "isHold", void 0);
    __decorate([
        property(Number)
    ], boli.prototype, "NodeH", void 0);
    boli = __decorate([
        ccclass
    ], boli);
    return boli;
}(cc.Component));
exports.default = boli;

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, 6928 characters]
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/StartScene.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, '9129bZ2zN5I673xCbm79sLC', 'StartScene');
// Script/StartScene.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 });
var Global_1 = require("./Global");
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var StartScene = /** @class */ (function (_super) {
    __extends(StartScene, _super);
    function StartScene() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.paihangbang = null;
        // LIFE-CYCLE CALLBACKS:
        _this.mainNode = null;
        _this.UpAni = null;
        _this.DownAni = null;
        /**
         * 玩家信息
         */
        _this.USERINFO = {
            userId: '12312313',
            score: 0,
        };
        _this.channel = "test";
        return _this;
    }
    StartScene.prototype.onLoad = function () {
        console.log("find --------------------1");
        // // this.LifeDing.zIndex = 5;
        // cc.sys.localStorage.removeItem("info");
        var infostr = cc.sys.localStorage.getItem("info");
        if (infostr == null || infostr == undefined || infostr == "") {
            infostr = { userId: '', score: 0, };
            infostr = JSON.stringify(infostr);
            cc.sys.localStorage.setItem("info", infostr);
        }
        console.log("------------------4 : " + infostr);
        this.USERINFO = JSON.parse(infostr);
        if (this.USERINFO == null || this.USERINFO == undefined) {
            this.USERINFO = {
                userId: '',
                score: 0,
            };
            this.LoadData();
            console.log("------------------5");
            this.USERINFO = JSON.parse(cc.sys.localStorage.getItem("info"));
        }
        Global_1.default.instance.setSN(this);
        Global_1.default.instance.OverFlag = false;
        var startNode = this.node.getChildByName("BgNode").getChildByName("kaiji");
        var Ani = startNode.getComponent(cc.Animation);
        var Anistate = Ani.play("kaiji");
        Anistate.wrapMode = cc.WrapMode.Loop;
        this.UpAni = startNode.getChildByName("Up").getComponent(cc.Animation);
        this.DownAni = startNode.getChildByName("Down").getComponent(cc.Animation);
        console.log("find --------------------1#");
    };
    StartScene.prototype.start = function () {
        var self = this;
        // self.USERINFO.userId = "playerB10";
        // self.USERINFO.score = 0;
        self.scheduleOnce(function () {
            Global_1.default.instance.SetUser(self.USERINFO);
            Global_1.default.instance.Channel = self.channel;
            //this.Login();
        }, 0.5);
    };
    StartScene.prototype.update = function (dt) {
        // cc.systemEvent.on(cc.SystemEvent.EventType.KEY_DOWN,this.onKeyBackSpace,this);
        // cc.systemEvent.on(cc.SystemEvent.EventType.KEY_DOWN,this.onKeyDown,this);
    };
    /**
     * start game
     */
    StartScene.prototype.StartGame = function () {
        var self = this;
        var startTime = Date.now();
        var endTime;
        Global_1.default.instance.OverFlag = false;
        Global_1.default.instance.AniFalg = false;
        Global_1.default.instance.LorR = 0;
        Global_1.default.instance.InitSpeed = 8.5;
        Global_1.default.instance.moveSpeed = 1;
        Global_1.default.instance.FHFallSpeed = 2;
        cc.sys.localStorage.setItem("hfsj", "99");
        self.UpAnistate = self.UpAni.play();
        self.DownAnistate = self.DownAni.play();
        self.scheduleOnce(function () {
            self.node.runAction(cc.sequence(cc.fadeOut(0.5), cc.callFunc(function () {
                cc.director.loadScene("MainScene");
                endTime = Date.now();
                if (endTime - startTime > 330) {
                    self.destroy();
                }
                console.log("场景跳转成功");
            })));
        }, 0.33);
    };
    /**
     * use the backSpace start game
     * @param event
     */
    StartScene.prototype.onKeyBackSpace = function (event) {
        if (event.keyCode == cc.KEY.space) {
            this.StartGame();
        }
    };
    /**
 * 登录
 */
    StartScene.prototype.Login = function () {
        var self = this;
        var channelStr = Global_1.default.instance.Channel;
        var uNam = Global_1.default.instance.GetUSer().userId;
        /* Http.sendRequest("/login",{channel:channelStr,userId:uNam},function(msg){
              console.log("------------------6");
             let code = JSON.parse(msg.code);
             console.log(code);
             if(code!=0){
                 Global.instance.NetStatus = false;
             }
              console.log("------------------7");
             let mmsg = JSON.parse(msg.msg);
             self.USERINFO.userId = mmsg.userId;
             self.USERINFO.score = mmsg.score;
             Global.instance.getLocalScore().BestScore = mmsg.score;
             Global.instance.SetUser(self.USERINFO);
         });*/
        var ux = {
            userId: '',
        };
        ux.userId = channelStr + Global_1.default.instance.GetUSer().userId;
        /* Http.sendRequest("/rank",ux,function(mmsg){
              console.log("------------------8");
             let MM = JSON.parse(mmsg.msg);
             console.log(MM);
             if(Global.instance.GetR()==null||Global.instance.GetR().rank==undefined||Global.instance.GetR().rank<MM.my.rank){
                 Global.instance.SetR(MM.my.rank);
                 Global.instance.SetS(MM.other);
             }
         });*/
    };
    //需要更多源码联系Q:852183691
    //或者
    //关注微信公众号“史于二”
    StartScene.prototype.CheckRank = function () {
        this.destroy();
        cc.director.loadScene("EndScene");
    };
    StartScene.prototype.IdGenerater = function () {
        var str = "";
        var suffix = "";
        var Id;
        var Word;
        for (var i = 0; i < 2; i++) {
            var ranNum = Math.ceil(Math.random() * 25);
            Word = String.fromCharCode(65 + ranNum);
            str += Word;
        }
        for (var i = 0; i < 7; i++) {
            var suffixNum = Math.ceil(Math.random() * 9);
            suffix += suffixNum.toString();
        }
        Id = str + suffix;
        return Id;
    };
    StartScene.prototype.LoadData = function () {
        var self = this;
        var id = self.IdGenerater();
        self.USERINFO.userId = id;
        self.USERINFO.score = 0;
        cc.sys.localStorage.setItem("info", JSON.stringify(self.USERINFO));
        // cc.sys.localStorage.removeItem("info");
        // let url = cc.url.raw("resources/INFO/data.json");
        // let infotem;
        // cc.loader.load(url,function(err,res){
        //     if(err){
        //     console.log("load"+url,err+"err result:"+JSON.stringify(res));
        //     }
        //     infotem = res;
        // });
    };
    __decorate([
        property(cc.Prefab)
    ], StartScene.prototype, "paihangbang", void 0);
    StartScene = __decorate([
        ccclass
    ], StartScene);
    return StartScene;
}(cc.Component));
exports.default = StartScene;
/**
 * 联网登录放在开始游戏的时候，期间获取一次排行数据
 * 这里有一个逻辑上的问题：如果第一次玩的分数是0，就
 */

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, 16140 characters]
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/getP.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, 'd882cch+zFKZbKyVCF21USv', 'getP');
// Script/getP.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 });
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var getP = /** @class */ (function (_super) {
    __extends(getP, _super);
    function getP() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    // LIFE-CYCLE CALLBACKS:
    // onLoad () {}
    getP.prototype.start = function () {
    };
    getP.prototype.update = function (dt) { };
    getP.prototype.onCollisionEnter = function () {
        console.log("碰撞到了");
    };
    getP = __decorate([
        ccclass
    ], getP);
    return getP;
}(cc.Component));
exports.default = getP;

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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFzc2V0c1xcU2NyaXB0XFxnZXRQLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUNNLElBQUEsS0FBc0IsRUFBRSxDQUFDLFVBQVUsRUFBbEMsT0FBTyxhQUFBLEVBQUUsUUFBUSxjQUFpQixDQUFDO0FBRzFDO0lBQWtDLHdCQUFZO0lBQTlDOztJQWdCQSxDQUFDO0lBYkcsd0JBQXdCO0lBRXhCLGVBQWU7SUFFZixvQkFBSyxHQUFMO0lBRUEsQ0FBQztJQUVELHFCQUFNLEdBQU4sVUFBUSxFQUFFLElBQUcsQ0FBQztJQUVkLCtCQUFnQixHQUFoQjtRQUNJLE9BQU8sQ0FBQyxHQUFHLENBQUMsTUFBTSxDQUFDLENBQUM7SUFDeEIsQ0FBQztJQWZnQixJQUFJO1FBRHhCLE9BQU87T0FDYSxJQUFJLENBZ0J4QjtJQUFELFdBQUM7Q0FoQkQsQUFnQkMsQ0FoQmlDLEVBQUUsQ0FBQyxTQUFTLEdBZ0I3QztrQkFoQm9CLElBQUkiLCJmaWxlIjoiIiwic291cmNlUm9vdCI6Ii8iLCJzb3VyY2VzQ29udGVudCI6WyJcclxuY29uc3Qge2NjY2xhc3MsIHByb3BlcnR5fSA9IGNjLl9kZWNvcmF0b3I7XHJcblxyXG5AY2NjbGFzc1xyXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBnZXRQIGV4dGVuZHMgY2MuQ29tcG9uZW50IHtcclxuXHJcblxyXG4gICAgLy8gTElGRS1DWUNMRSBDQUxMQkFDS1M6XHJcblxyXG4gICAgLy8gb25Mb2FkICgpIHt9XHJcblxyXG4gICAgc3RhcnQgKCkge1xyXG5cclxuICAgIH1cclxuXHJcbiAgICB1cGRhdGUgKGR0KSB7fVxyXG5cclxuICAgIG9uQ29sbGlzaW9uRW50ZXIoKXtcclxuICAgICAgICBjb25zb2xlLmxvZyhcIueisOaSnuWIsOS6hlwiKTtcclxuICAgIH1cclxufVxyXG4iXX0=
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/MainScene.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, '726051WgaxHep/G1I05lW4n', 'MainScene');
// Script/MainScene.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 });
var Global_1 = require("./Global");
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var MainScene = /** @class */ (function (_super) {
    __extends(MainScene, _super);
    function MainScene() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.boli = null;
        _this.dici = null;
        _this.lvdai = null;
        _this.shandian = null;
        _this.tanhuang = null;
        _this.Opplvdai = null;
        _this.GD = null;
        _this.failure = null;
        _this.fuhuo = null;
        _this.Player = null;
        _this.FHolderNode = null;
        _this.Bg = null;
        _this.LifeDing = null;
        _this.LEFT = null;
        _this.RIGHT = null;
        _this.output = null;
        // LIFE-CYCLE CALLBACKS:
        /**
         * 上一个落脚点生成时间
         */
        _this.STime = 0;
        /**
         * 当前落脚点生成时间
         */
        _this.ETime = 0;
        /** Left*/
        _this.LkeyDown = false;
        /** Right*/
        _this.RkeyDown = false;
        /**the loght FootHolder F */
        _this.lightF = false;
        _this.moveFalg = "";
        _this.USERINFO = {
            userId: "",
            score: 0,
        };
        return _this;
    }
    MainScene.prototype.onLoad = function () {
        var time = cc.sys.localStorage.getItem("hfsj");
        if (time == null || time == undefined || time == "") {
            cc.sys.localStorage.setItem("hfsj", "99");
        }
        this.LifeDing.zIndex = 10;
        this.FHolderNode.zIndex = 9;
        Global_1.default.instance.setMN(this.node);
        this.STime = Date.now();
        var FHolder = cc.instantiate(this.GD);
        this.FHolderNode.addChild(FHolder, 10, "GD");
        FHolder.getComponent("GD").init(this, 1);
        FHolder.y = -150;
        var FHolder2 = cc.instantiate(this.lvdai);
        this.FHolderNode.addChild(FHolder2, 10, "lvdai");
        FHolder2.getComponent("lvdai").init(this);
        FHolder2.y = -300;
        // let FHolder2 = cc.instantiate(this.tanhuang);
        // this.FHolderNode.addChild(FHolder2,10,"tanhuang");
        // FHolder2.getComponent("tanhuang").init(this);
        // FHolder2.y = -300;
        var FHolder3 = cc.instantiate(this.GD);
        this.FHolderNode.addChild(FHolder3, 10, "GD");
        FHolder3.getComponent("GD").init(this, 1);
        FHolder3.y = -450;
        // this.Player.active = false;
        this.Player.x = FHolder.x;
        // this.Player.y = FHolder.y+60;
        this.Player.zIndex = 11;
        for (var i = 0; i < this.LifeDing.children.length; i++) {
            if (this.LifeDing.children[i].name == "lifeBG") {
                if (!this.LifeDing.children[i].active) {
                    this.LifeDing.children[i].active = true;
                }
                Global_1.default.instance.reLife.push(this.LifeDing.children[i]);
            }
        }
        cc.director.getCollisionManager().enabled = true;
        // cc.director.getCollisionManager().enabledDebugDraw = true;
        cc.director.getCollisionManager().enabledDrawBoundingBox = false;
    };
    MainScene.prototype.playtansound = function () {
        if (Global_1.default.instance.OverFlag == false) {
            cc.loader.loadRes("tan", cc.AudioClip, function (err, clip) {
                var audioID = cc.audioEngine.play(clip, false, 0.5);
            });
        }
    };
    MainScene.prototype.playdeadsound = function () {
        cc.loader.loadRes("dead", cc.AudioClip, function (err, clip) {
            var audioID = cc.audioEngine.play(clip, false, 0.5);
        });
    };
    MainScene.prototype.start = function () {
    };
    MainScene.prototype.update = function (dt) {
        // console.log(Global.instance.CollisionFlag);
        this.MoveBg();
        Global_1.default.instance.moveSpeed = 1;
        var FHolder;
        if ((this.ETime - this.STime) > (1200 - (180 * (Global_1.default.instance.FHFallSpeed - 2)))) { //控制落脚点之间的间距,间距144px
            this.STime = Date.now();
            if (!Global_1.default.instance.OverFlag) {
                FHolder = this.FootHoldGenerator(null);
                // this.Score();
            }
        }
        this.FHolder();
        this.reduceLife();
        if (Global_1.default.instance.CollisionFlag) { //左右传送带减速
            switch (Global_1.default.instance.KIND_FootHold) {
                case 3: {
                    this.Player.x += 2;
                    break;
                }
                case 4: {
                    this.Player.x -= 2;
                    break;
                }
                case 7: {
                    if (Global_1.default.instance.LorR == 1) {
                        this.Player.x--;
                    }
                    else {
                        this.Player.x++;
                    }
                    break;
                }
                default: {
                    break;
                }
            }
        }
        if (this.Player.x < -180) {
            this.Player.x = -180;
        }
        if (this.Player.x > 180) {
            this.Player.x = 180;
        }
        if (this.Player.y < (-510)) {
            for (var i = 0; i < this.LifeDing.children.length; i++) {
                if (this.LifeDing.children[i].name == "lifeBG") {
                    this.LifeDing.children[i].active = false;
                }
            }
            this.gameOver();
        }
        if (Global_1.default.instance.reLife.length == 0) {
            this.gameOver();
        }
        this.ETime = Date.now();
        var AllChildren = new Array();
        var GDChildren = new Array();
        AllChildren = this.node.getChildByName("BgNode").getChildByName("FHolder").children;
        for (var i = 0; i < AllChildren.length; i++) {
            if (AllChildren[i].name == "GD") {
                GDChildren.push(AllChildren[i]);
            }
        }
        // cc.systemEvent.on(cc.SystemEvent.EventType.KEY_DOWN,this.onKeyDown,this);
        //cc.systemEvent.on(cc.SystemEvent.EventType.KEY_UP,this.onKeyUp,this);
        this.Listener();
    };
    MainScene.prototype.Listener = function () {
        var _this = this;
        var btnClickArr = new Array(2);
        if (!this.LkeyDown) {
            this.RIGHT.node.on(cc.Node.EventType.TOUCH_START, this.BtnTurnRight, this);
            this.RIGHT.node.on(cc.Node.EventType.TOUCH_MOVE, this.BtnTurnRight, this);
            this.RIGHT.node.on(cc.Node.EventType.TOUCH_CANCEL, this.onKeyUp, this);
            btnClickArr.push(this.RIGHT);
            this.RIGHT.node.on(cc.Node.EventType.TOUCH_END, function () {
                _this.onKeyUp;
            }, this);
        }
        else {
            this.RIGHT.node.off(cc.Node.EventType.TOUCH_START, this.BtnTurnRight, this);
            this.RIGHT.node.off(cc.Node.EventType.TOUCH_MOVE, this.BtnTurnRight, this);
            this.RIGHT.node.off(cc.Node.EventType.TOUCH_CANCEL, this.onKeyUp, this);
            this.RIGHT.node.off(cc.Node.EventType.TOUCH_END, function () {
                _this.onKeyUp;
            }, this);
        }
        if (!this.RkeyDown) {
            this.LEFT.node.on(cc.Node.EventType.TOUCH_START, this.BtnTurnLeft, this);
            this.LEFT.node.on(cc.Node.EventType.TOUCH_MOVE, this.BtnTurnLeft, this);
            this.LEFT.node.on(cc.Node.EventType.TOUCH_CANCEL, this.onKeyUp, this);
            // btnClickArr.push(this.LEFT);
            this.LEFT.node.on(cc.Node.EventType.TOUCH_END, function () {
                _this.onKeyUp;
            }, this);
        }
        else {
            this.LEFT.node.off(cc.Node.EventType.TOUCH_START, this.BtnTurnLeft, this);
            this.LEFT.node.off(cc.Node.EventType.TOUCH_MOVE, this.BtnTurnLeft, this);
            this.LEFT.node.off(cc.Node.EventType.TOUCH_CANCEL, this.onKeyUp, this);
            this.LEFT.node.off(cc.Node.EventType.TOUCH_END, function () {
                _this.onKeyUp;
            }, this);
        }
    };
    MainScene.prototype.StopAni = function (self) {
        if (!Global_1.default.instance.AniFalg) {
            var FHolder = self.node.getChildByName("BgNode").getChildByName("FHolder").children;
            var Fname = void 0;
            for (var i = 0; FHolder.length; i++) {
                if (i == FHolder.length - 1) {
                    Global_1.default.instance.AniFalg = true;
                    return;
                }
                Fname = FHolder[i].name;
                FHolder[i].getComponent(Fname).enabled = false;
            }
        }
    };
    /**
     * player 移出落脚点
     */
    MainScene.prototype.FHolder = function () {
        var self = this;
        var FHArray = this.FHolderNode.children;
        var Ani; //the Animation of Player when player fall down
        var Anistate; //the state of Ani;
        for (var i = FHArray.length - 1; i >= 0; i--) {
            if (FHArray[i].isHold) {
                // let nameNode:string = FHArray[i].name;
                if (self.Player.x > (FHArray[i].x + 75)) {
                    Global_1.default.instance.CollisionFlag = false;
                    FHArray[i].isHold = false;
                    // this.Score();
                }
                else if (self.Player.x < (FHArray[i].x - 75)) {
                    Global_1.default.instance.CollisionFlag = false;
                    FHArray[i].isHold = false;
                    // this.Score();
                }
                else {
                    Global_1.default.instance.CollisionFlag = true;
                    FHArray[i].isHold = true;
                }
            }
        }
    };
    /**
     * 移动背景,初始移动速度200px/s
     */
    MainScene.prototype.MoveBg = function () {
        var Bg0 = this.Bg.getChildByName("Bg_0");
        var Bg1 = this.Bg.getChildByName("Bg_1");
        if (Global_1.default.instance.OverFlag) {
        }
        else {
            Bg0.y += Global_1.default.instance.FHFallSpeed + 1;
            Bg1.y += Global_1.default.instance.FHFallSpeed + 1;
            if (Bg0.y > 946) {
                Bg0.y = -946;
            }
            if (Bg1.y > 946) {
                Bg1.y = -946;
            }
        }
    };
    /**
     * 生成落脚点
     */
    MainScene.prototype.FootHoldGenerator = function (rtpe) {
        var self = this;
        var Magnification = 0;
        var f = parseInt(self.LifeDing.getChildByName("Floor").getComponent(cc.Label).string);
        if (f < 20) {
            Magnification = 2;
        }
        else if (f < 40) {
            Magnification = 4;
        }
        else if (f < 60) {
            Magnification = 6;
        }
        else if (f < 80) {
            Magnification = 8;
        }
        else {
            Magnification = 8;
        }
        var KindHolder = Math.ceil(Math.random() * Magnification);
        // KindHolder = 7;
        var FHolder;
        // KindHolder = Math.ceil(Math.random()*7);
        if (KindHolder == 3 || KindHolder == 4) {
            var va = Math.random() * 10;
            if (va >= 1 && va < 4) {
                KindHolder = 7;
            }
            else if (va >= 4 && va < 10) {
                KindHolder = 5;
            }
            //KindHolder = 5;
            console.log("KindHolder gb: " + KindHolder);
        }
        if (rtpe != null) {
            KindHolder = rtpe;
            console.log("KindHolder gb2: " + KindHolder);
        }
        this.ETime = Date.now();
        switch (KindHolder) {
            case 1: {
                FHolder = cc.instantiate(self.GD);
                self.FHolderNode.addChild(FHolder, 5, "GD");
                FHolder.getComponent("GD").init(self, 1);
                FHolder.isHold = false;
                // console.log("产生第一种落脚点");
                break;
            }
            case 2: {
                FHolder = cc.instantiate(self.GD);
                self.FHolderNode.addChild(FHolder, 5, "GD");
                FHolder.getComponent("GD").init(self, 7);
                FHolder.isHold = false;
                /*self.FootHoldGenerator();
                FHolder = cc.instantiate(self.tanhuang);
                self.FHolderNode.addChild(FHolder,5,"tanhuang");
                FHolder.getComponent("tanhuang").init(self);
                FHolder.isHold = false;
               // // console.log("产生第五种落脚点");
               // break;*/
                break;
            }
            case 3: {
                FHolder = cc.instantiate(self.lvdai);
                self.FHolderNode.addChild(FHolder, 5, "lvdai");
                FHolder.getComponent("lvdai").init(self);
                FHolder.isHold = false;
                // console.log("产生第二种落脚点");
                console.log(" 创建滚动 ");
                break;
            }
            case 4: {
                FHolder = cc.instantiate(self.lvdai);
                self.FHolderNode.addChild(FHolder, 5, "lvdai");
                FHolder.getComponent("lvdai").init(self);
                FHolder.isHold = false;
                // console.log("产生第五种落脚点");
                console.log(" 创建滚动1 ");
                break;
            }
            case 5: {
                FHolder = cc.instantiate(self.boli);
                self.FHolderNode.addChild(FHolder, 5, "boli");
                FHolder.getComponent("boli").init(self);
                FHolder.isHold = false;
                // console.log("产生第三种落脚点");
                break;
            }
            case 6: {
                FHolder = cc.instantiate(self.dici);
                self.FHolderNode.addChild(FHolder, 5, "dici");
                FHolder.getComponent("dici").init(self);
                FHolder.isHold = false;
                // console.log("产生第四种落脚点");
                break;
            }
            case 7: {
                FHolder = cc.instantiate(self.GD);
                self.FHolderNode.addChild(FHolder, 5, "GD");
                FHolder.getComponent("GD").init(self, 7);
                FHolder.isHold = false;
                break;
            }
            case 8: {
                if (self.lightF) {
                    self.lightF = false;
                    self.FootHoldGenerator(null);
                    break;
                }
                FHolder = cc.instantiate(self.shandian);
                self.FHolderNode.addChild(FHolder, 5, "shandian");
                FHolder.getComponent("shandian").init(self);
                FHolder.isHold = false;
                self.lightF = true;
                break;
            }
            // default:{
            //     FHolder = cc.instantiate(self.GD);
            //     self.FHolderNode.addChild(FHolder,5,"GD");
            //     FHolder.getComponent("GD").init(self);
            //     FHolder.getComponent("GD").enabled = true;
            //     FHolder.getComponent("MoveGD").init(self);
            //     FHolder.getComponent("MoveGD").enabled = false;
            //     FHolder.isHold = false;
            //     // console.log("默认产生第一种落脚点");
            // }
            // break;
        }
        return FHolder;
    };
    /**
     * 按钮触发，向左，长按事件
     */
    MainScene.prototype.BtnTurnLeft = function (event) {
        var self = this;
        if (self.RkeyDown) {
            return;
        }
        else {
            self.LkeyDown = true;
            self.RkeyDown = false;
            this.BtnLorR(event);
        }
    };
    /**
     * 按钮触发，向右,长按事件,长按响应未解决
     */
    MainScene.prototype.BtnTurnRight = function (event) {
        var self = this;
        if (self.LkeyDown) {
            return;
        }
        else {
            self.LkeyDown = false;
            self.RkeyDown = true;
            this.BtnLorR(event);
        }
    };
    /**
     * btn触发事件
     * @param event 按钮触发事件
     */
    MainScene.prototype.BtnLorR = function (event) {
        var self = this;
        Global_1.default.instance.moveSpeed = 1;
        var schedule = cc.director.getScheduler();
        var stand = self.Player.getChildByName("stand");
        var runRight = self.Player.getChildByName("runRight");
        var run = self.Player.getChildByName("run");
        var Ani; //the animation of player
        var Anistate; //the Ani's state
        var Anistring; //the name of Ani
        var moveByTime = 1;
        var scheduleState = false; //the schedule's state
        var schedulePause = true;
        var target = null; //the target which is binged to schedule
        var moveByDes = Global_1.default.instance.moveSpeed * 120 + 40;
        if (self.LkeyDown) {
            target = self.LEFT;
            moveByTime = 1;
            moveByDes = -moveByDes;
            scheduleState = schedule.isScheduled(func, target);
            // self.output.getComponent(cc.Label).string = Anistring;
            schedulePause = schedule.isTargetPaused(target);
            Ani = run.getComponent(cc.Animation);
            Anistring = "run";
            stand.active = false;
            runRight.active = false;
            run.active = true;
            // self.output.getComponent(cc.Label).string = Anistring;
            if (!Global_1.default.instance.CollisionFlag) {
                moveByTime = 1;
            }
            else {
                switch (Global_1.default.instance.KIND_FootHold) {
                    case 2: {
                        moveByTime = 4.1;
                        self.output.getComponent(cc.Label).string = Global_1.default.instance.KIND_FootHold + "2";
                        break;
                    }
                    case 5: {
                        moveByTime = 3.9;
                        // self.output.getComponent(cc.Label).string = Global.instance.KIND_FootHold+"5";
                        break;
                    }
                }
                ;
            }
        }
        if (self.RkeyDown) {
            target = self.RIGHT;
            moveByTime = 1;
            moveByDes = moveByDes;
            scheduleState = schedule.isScheduled(func, target);
            // self.output.getComponent(cc.Label).string = Anistring;
            schedulePause = schedule.isTargetPaused(target);
            Ani = runRight.getComponent(cc.Animation);
            Anistring = "runR";
            stand.active = false;
            runRight.active = true;
            run.active = false;
            // self.output.getComponent(cc.Label).string = Anistring;
            if (!Global_1.default.instance.CollisionFlag) {
                moveByTime = 1;
            }
            else {
                switch (Global_1.default.instance.KIND_FootHold) {
                    case 2: {
                        moveByTime = 4.1;
                        // self.output.getComponent(cc.Label).string = Global.instance.KIND_FootHold+"2";
                        break;
                    }
                    case 5: {
                        moveByTime = 3.9;
                        // self.output.getComponent(cc.Label).string = Global.instance.KIND_FootHold+"5";
                        break;
                    }
                }
                ;
            }
        }
        var funcFlag = false;
        switch (event.type) {
            case "touchstart": {
                if (!(self.moveFalg.length == 0)) {
                    break;
                }
                self.moveFalg = "touchstart";
                if (!scheduleState) {
                    // self.output.getComponent(cc.Label).string = movefalg;
                    schedule.schedule(func, target, 0);
                }
                ;
                if (schedulePause) {
                    schedule.resumeTarget(target);
                }
                ;
                break;
            }
            case "touchmove": {
                if (!(self.moveFalg.length == 0)) {
                    break;
                }
                self.moveFalg = "touchmove";
                // self.output.getComponent(cc.Label).string = movefalg;
                if (!scheduleState) {
                    schedule.schedule(func, target, 0);
                }
                ;
                if (schedulePause) {
                    schedule.resumeTarget(target);
                }
                ;
                break;
            }
            case "touchcancel": {
                break;
            }
            case "touchend": {
                // self.output.getComponent(cc.Label).string = "touchend";
                schedule.pauseTarget(target);
                self.Player.stopAllActions();
                Ani.stop(Anistring);
                moveByTime = 1;
                moveByDes = Global_1.default.instance.moveSpeed * 120 + 40;
                switch (Anistring) {
                    case "run": {
                        run.active = false;
                        runRight.active = false;
                        stand.active = true;
                        self.LkeyDown = false;
                        self.RkeyDown = false;
                        moveByDes = Global_1.default.instance.moveSpeed / 2;
                        break;
                    }
                    case "runR": {
                        run.active = false;
                        runRight.active = false;
                        stand.active = true;
                        self.LkeyDown = false;
                        self.RkeyDown = false;
                        moveByDes = Global_1.default.instance.moveSpeed / 2;
                        break;
                    }
                }
                funcFlag = false;
                self.moveFalg = "";
                break;
            }
        }
        function func() {
            if (funcFlag) {
                return;
            }
            if (Global_1.default.instance.CollisionFlag) {
                moveByTime = 1;
            }
            var spawn = cc.spawn(cc.callFunc(function () {
                self.Player.runAction(cc.moveBy(moveByTime, moveByDes, 0));
            }), cc.callFunc(function () {
                Anistate = Ani.play(Anistring);
                Anistate.speed = 1;
                Anistate.repeatCount = 100;
                Anistate = Ani.playAdditive(Anistring);
            }));
            self.Player.runAction(spawn);
            funcFlag = true;
        }
    };
    /**
     * 返回键监听
     * @param event 按下返回键退出游戏
     */
    MainScene.prototype.AniPlayer = function (Ani, Anistate, moveByTime, moveByDes, Key, AniName, self) {
        Ani = Key.getComponent(cc.Animation);
        var spawn = cc.spawn(cc.callFunc(function () {
            self.Player.runAction(cc.moveBy(moveByTime, moveByDes, 0));
        }), cc.callFunc(function () {
            Anistate = Ani.play(AniName);
            Anistate.speed = 2;
            Anistate.repeatCount = 100;
        }));
        self.Player.runAction(spawn);
        if (!Ani.state) {
            var spawn2 = cc.spawn(cc.callFunc(function () {
                self.Player.runAction(cc.moveBy(moveByTime, moveByDes, 0));
            }), cc.callFunc(function () {
                Anistate = Ani.play(AniName);
                Anistate.speed = 2;
                Anistate.repeatCount = 100;
            }));
            self.Player.runAction(spawn2);
        }
    };
    /**
     * 抬起动画停止
     * @param event 抬起左右键触发
     */
    MainScene.prototype.onKeyUp = function (event) {
        var self = this;
        self.LkeyDown = false;
        this.RkeyDown = false;
        self.Player.stopAllActions();
        var stand = this.Player.getChildByName("stand");
        var runRight = this.Player.getChildByName("runRight");
        var run = this.Player.getChildByName("run");
        stand.active = true;
        run.active = false;
        runRight.active = false;
    };
    /**
     * gameover
     */
    MainScene.prototype.gameOver = function () {
        var self = this;
        self.Player.stopAllActions();
        Global_1.default.instance.CollisionFlag = false;
        // self.Player.getComponent(cc.BoxCollider).enabled = false;
        self.Player.getComponent("Playcontroler").enabled = false;
        try {
            self.Player.getComponent(cc.Animation).stop();
        }
        catch (error) {
            self.node.getChildByName("output").getComponent(cc.Label).string = error;
        }
        self.Player.getChildByName("stand").active = true;
        self.Player.getChildByName("runRight").active = false;
        self.Player.getChildByName("run").active = false;
        self.Player.y -= Global_1.default.instance.InitSpeed;
        var AllFH = self.node.getChildByName("BgNode").getChildByName("FHolder").children;
        for (var i = 0; i < AllFH.length; i++) {
            var FHNA = AllFH[i].name;
            AllFH[i].getComponent(FHNA).enabled = false;
            AllFH[i].isHold = false;
            if (FHNA == "GD") {
                AllFH[i].getChildByName("gd").getComponent("CliGD").enabled = false;
            }
        }
        self.StopAni(self);
        var failure;
        var Ani;
        var Anistate;
        var BestScore;
        var thisScore;
        var lessScore;
        var Score;
        var fuhuo;
        var FAni;
        var FAnistate;
        self.LEFT.node.active = false;
        self.RIGHT.node.active = false;
        failure = cc.instantiate(self.failure);
        fuhuo = cc.instantiate(self.fuhuo);
        var fhuoBtnRank = fuhuo.getChildByName("cd").getChildByName("RankScene").getComponent(cc.Button);
        var fhuoBtnreGame = fuhuo.getChildByName("zl").getChildByName("rePlay").getComponent(cc.Button);
        var fhuoBtnFhuo = fuhuo.getChildByName("fh").getChildByName("rePlay").getComponent(cc.Button);
        var RankEventHandler = new cc.Component.EventHandler();
        var reGameEventHandler = new cc.Component.EventHandler();
        var FhuoEventHandler = new cc.Component.EventHandler();
        //open the ranking
        RankEventHandler.target = self.node;
        RankEventHandler.component = "MainScene";
        RankEventHandler.handler = "FBtnCB_Rank";
        RankEventHandler.customEventData = null;
        fhuoBtnRank.clickEvents.push(RankEventHandler);
        //replay
        reGameEventHandler.target = self.node;
        reGameEventHandler.component = "MainScene";
        reGameEventHandler.handler = "restart";
        reGameEventHandler.customEventData = null;
        fhuoBtnreGame.clickEvents.push(reGameEventHandler);
        //fh立即复活会有其他功能暂时用重新开始代替
        FhuoEventHandler.target = self.node;
        FhuoEventHandler.component = "MainScene";
        FhuoEventHandler.handler = "FBtnCB_rePlay";
        FhuoEventHandler.customEventData = null;
        fhuoBtnFhuo.clickEvents.push(FhuoEventHandler);
        if (!Global_1.default.instance.OverFlag) {
            Global_1.default.instance.OverFlag = true;
            self.StoregeScore();
            // self.UpdateScore();
            failure.y = -20;
            fuhuo.y = 0;
            thisScore = parseInt(self.LifeDing.getChildByName("Floor").getComponent(cc.Label).string);
            lessScore = failure.getChildByName("jl").getChildByName("LessScore");
            BestScore = Global_1.default.instance.getLocalScore().BestScore;
            Global_1.default.instance.GetUSer().score = BestScore;
            self.UpLoadScore();
            if (BestScore - thisScore <= 0) {
                failure.getChildByName("jl").active = false;
            }
            else {
                lessScore.getComponent(cc.Label).string = (BestScore - thisScore).toString();
            }
            Score = failure.getChildByName("cj").getChildByName("Score");
            self.node.addChild(failure);
            self.node.addChild(fuhuo);
            Score.getComponent(cc.Label).string = self.LifeDing.getChildByName("Floor").getComponent(cc.Label).string;
            Ani = failure.getComponent(cc.Animation); //the animation of failure;
            FAni = fuhuo.getComponent(cc.Animation);
            Anistate = Ani.play("shibai"); //the state of Ani;
            Anistate.speed = 1;
            Anistate.repeatCount = 1;
        }
        else {
            return;
        }
        self.playdeadsound();
        console.log("游戏结束！！！");
    };
    /**
     * 复活按钮的回调函数：打开排行榜
     */
    MainScene.prototype.FBtnCB_Rank = function (self) {
        this.destroy();
        cc.director.loadScene("EndScene");
    };
    /**
     * 复活按钮的回调函数：立即复活
     */
    MainScene.prototype.FBtnCB_rePlay = function () {
        cc.sys.localStorage.setItem("hfsj", "99");
        var self = this;
        Global_1.default.instance.OverFlag = false;
        Global_1.default.instance.AniFalg = false;
        Global_1.default.instance.LorR = 0;
        Global_1.default.instance.InitSpeed = 8.5;
        Global_1.default.instance.moveSpeed = 1;
        // Global.instance.FHFallSpeed = 2;
        Global_1.default.instance.CollisionFlag = false;
        Global_1.default.instance.CollisionWithDing = false;
        Global_1.default.instance.TheHolder = null;
        Global_1.default.instance.KIND_FootHold = 0;
        // this.RIGHT.node.off(cc.Node.EventType.TOUCH_START,this.BtnTurnRight,this);
        // this.RIGHT.node.off(cc.Node.EventType.TOUCH_MOVE,this.BtnTurnRight,this);
        // this.RIGHT.node.off(cc.Node.EventType.TOUCH_CANCEL,this.onKeyUp,this);
        this.LEFT.node.active = true;
        this.RIGHT.node.active = true;
        this.LkeyDown = false;
        this.RkeyDown = false;
        this.moveFalg = "";
        this.Player.y = 300;
        this.Player.x = 0;
        this.Player.getComponent("Playcontroler").enabled = true;
        this.Player.getComponent(cc.BoxCollider).enabled = true;
        var AllFH = this.node.getChildByName("BgNode").getChildByName("FHolder").children;
        this.node.getChildByName("SB").destroy();
        this.node.getChildByName("fuhuo1").destroy();
        for (var i = 0; i < this.LifeDing.children.length; i++) {
            //for(let i=0;i<2;i++){
            if (this.LifeDing.children[i].name == "lifeBG") {
                if (!this.LifeDing.children[i].active) {
                    this.LifeDing.children[i].active = true;
                }
                Global_1.default.instance.reLife.push(this.LifeDing.children[i]);
            }
        }
        this.Player.getComponent(cc.BoxCollider).enabled = false;
        for (var i = 0; i < AllFH.length; i++) {
            AllFH[i].destroy();
        }
        var F = this.FootHoldGenerator(1);
        F.y = -380;
        this.scheduleOnce(function () {
            self.Player.getComponent(cc.BoxCollider).enabled = true;
        }, 0.5);
    };
    /**
     * restart
     */
    MainScene.prototype.restart = function () {
        this.destroy();
        cc.director.loadScene("MainScene");
        cc.director.resume();
        Global_1.default.instance.OverFlag = false;
        Global_1.default.instance.AniFalg = false;
        Global_1.default.instance.LorR = 0;
        Global_1.default.instance.InitSpeed = 8.5;
        Global_1.default.instance.moveSpeed = 1;
        Global_1.default.instance.FHFallSpeed = 2;
        Global_1.default.instance.CollisionFlag = false;
        Global_1.default.instance.CollisionWithDing = false;
        Global_1.default.instance.TheHolder = null;
        Global_1.default.instance.KIND_FootHold = 0;
        // this.RIGHT.node.off(cc.Node.EventType.TOUCH_START,this.BtnTurnRight,this);
        // this.RIGHT.node.off(cc.Node.EventType.TOUCH_MOVE,this.BtnTurnRight,this);
        // this.RIGHT.node.off(cc.Node.EventType.TOUCH_CANCEL,this.onKeyUp,this);
        this.LEFT.node.active = true;
        this.RIGHT.node.active = true;
        this.LkeyDown = false;
        this.RkeyDown = false;
        // this.moveFalg = "";
        this.Player.y = 300;
        // this.Score();
    };
    /**
     * 受到伤害，命数减一
    */
    MainScene.prototype.reduceLife = function () {
        var self = this;
        var Ls = new Array();
        var reLCount = 0;
        var FHolder = self.node.getChildByName("BgNode").getChildByName("FHolder").children;
        for (var i = 0; i < FHolder.length; i++) {
            if (FHolder[i].isHold) {
                if (!Global_1.default.instance.CollisionFlag) {
                    FHolder[i].isHold = false;
                    var box = FHolder[i].getComponent(cc.BoxCollider);
                    box.enabled = false;
                }
            }
        }
        //
        for (var i = self.LifeDing.children.length - 1; i >= 0; i--) {
            if (self.LifeDing.children[i].name == "lifeBG") {
                if (Global_1.default.instance.Injured || Global_1.default.instance.CollisionWithDing) {
                    if (self.LifeDing.children[i].active) {
                        self.LifeDing.children[i].active = false;
                        Global_1.default.instance.Injured = false;
                        Global_1.default.instance.CollisionFlag = false;
                        Global_1.default.instance.CollisionWithDing = false;
                    }
                }
                Ls.push(self.LifeDing.children[i]);
            }
        }
        Global_1.default.instance.reLife = [];
        for (var i = 0; i < Ls.length; i++) {
            if (Ls[i].active) {
                Global_1.default.instance.reLife.push(Ls[i]); //player剩余的命数
            }
        }
        //
        var time = cc.sys.localStorage.getItem("hfsj");
        //console.log( time + "当前血 : " + Global.instance.reLife.length);
        if (Global_1.default.instance.reLife.length < 3) {
            if (time == 99) {
                var time_1 = Math.floor(Date.now() / 1000);
                cc.sys.localStorage.setItem("hfsj", time_1);
            }
            else {
                var time_2 = Math.floor(Date.now() / 1000);
                var timlod = parseInt(cc.sys.localStorage.getItem("hfsj"));
                var sub = time_2 - timlod;
                if (sub >= 20) {
                    var sizes = Global_1.default.instance.reLife.length + 2;
                    Global_1.default.instance.reLife = [];
                    for (var i = 0; i < sizes; i++) {
                        if (this.LifeDing.children[i].name == "lifeBG") {
                            if (!this.LifeDing.children[i].active) {
                                this.LifeDing.children[i].active = true;
                            }
                            Global_1.default.instance.reLife.push(this.LifeDing.children[i]);
                            // console.log("push --------------" + i);
                        }
                    }
                    cc.sys.localStorage.setItem("hfsj", time_2);
                    // console.log(sizes + "恢复血+1---------------------------------------" +  Global.instance.reLife.length);
                }
            }
        }
        else {
            cc.sys.localStorage.setItem("hfsj", "99");
        }
    };
    /**
     * 每下落一层，分数加一。
     */
    MainScene.prototype.Score = function () {
        var self = this.node;
        var scLabel = this.LifeDing.getChildByName("Floor").getComponent(cc.Label);
        var sc = parseInt(scLabel.string);
        if (!Global_1.default.instance.OverFlag) {
            sc = sc + 1;
        }
        this.playtansound();
        console.log("打印一下");
        scLabel.string = sc.toString();
        var lv = Math.ceil(sc / 50);
        if (lv > Global_1.default.instance.LevelAddFlag) {
            Global_1.default.instance.LevelAddFlag = lv;
            Global_1.default.instance.InitSpeed += 0.25; //每下落50层，player下落速度加0.25
            Global_1.default.instance.FHFallSpeed += 1; //没下落50层，落脚点下落速度加快0.5.
        }
    };
    /**
     * 本地分数存储
     */
    MainScene.prototype.StoregeScore = function () {
        var self = this;
        var localS = Global_1.default.instance.getLocalScore(); //the temp of local score;
        var CurrentScore = parseInt(this.LifeDing.getChildByName("Floor").getComponent(cc.Label).string);
        Global_1.default.instance.getLocalScore().CurrentScore = CurrentScore;
        if (CurrentScore > localS.ThirdScore) {
            if (CurrentScore > localS.SecondScore) {
                if (CurrentScore > localS.BestScore) {
                    localS.BestScore = CurrentScore;
                    return;
                }
                localS.SecondScore = CurrentScore;
            }
            localS.ThirdScore = CurrentScore;
        }
    };
    /**
     * upload the best score
     */
    MainScene.prototype.UpLoadScore = function () {
        var self = this;
        var tmp = Global_1.default.instance.GetUSer();
        /* Http.sendRequest("/updateScore",tmp,function(msg){
             let x = msg;
             if(msg.code!=0){
                 Global.instance.NetStatus = false;
             }
             let ux = {
                 userId:'',
             }
             console.log(x);
             ux.userId = Global.instance.GetUSer().userId;
             Http.sendRequest("/rank",ux,function(mmsg){
                  console.log("------------------3");
                 let MM = JSON.parse(mmsg.msg);
                 console.log(MM);
                 if(Global.instance.GetR()==null||Global.instance.GetR().rank==undefined||Global.instance.GetR().rank<MM.my.rank){
                     Global.instance.SetR(MM.my.rank);
                     Global.instance.setRemoteScore(MM.other);
                 }
             });
         });*/
    };
    __decorate([
        property(cc.Prefab)
    ], MainScene.prototype, "boli", void 0);
    __decorate([
        property(cc.Prefab)
    ], MainScene.prototype, "dici", void 0);
    __decorate([
        property(cc.Prefab)
    ], MainScene.prototype, "lvdai", void 0);
    __decorate([
        property(cc.Prefab)
    ], MainScene.prototype, "shandian", void 0);
    __decorate([
        property(cc.Prefab)
    ], MainScene.prototype, "tanhuang", void 0);
    __decorate([
        property(cc.Prefab)
    ], MainScene.prototype, "Opplvdai", void 0);
    __decorate([
        property(cc.Prefab)
    ], MainScene.prototype, "GD", void 0);
    __decorate([
        property(cc.Prefab)
    ], MainScene.prototype, "failure", void 0);
    __decorate([
        property(cc.Prefab)
    ], MainScene.prototype, "fuhuo", void 0);
    __decorate([
        property(cc.Node)
    ], MainScene.prototype, "Player", void 0);
    __decorate([
        property(cc.Node)
    ], MainScene.prototype, "FHolderNode", void 0);
    __decorate([
        property(cc.Node)
    ], MainScene.prototype, "Bg", void 0);
    __decorate([
        property(cc.Node)
    ], MainScene.prototype, "LifeDing", void 0);
    __decorate([
        property(cc.Button)
    ], MainScene.prototype, "LEFT", void 0);
    __decorate([
        property(cc.Button)
    ], MainScene.prototype, "RIGHT", void 0);
    __decorate([
        property(cc.Label)
    ], MainScene.prototype, "output", void 0);
    MainScene = __decorate([
        ccclass
    ], MainScene);
    return MainScene;
}(cc.Component));
exports.default = MainScene;

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, 96928 characters]
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/fuhuo1.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, '212dcEFGudE/bMTw40KdR9J', 'fuhuo1');
// Script/fuhuo1.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 });
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var NewClass = /** @class */ (function (_super) {
    __extends(NewClass, _super);
    function NewClass() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    // LIFE-CYCLE CALLBACKS:
    NewClass.prototype.onLoad = function () {
        this.node.getChildByName("cd").getChildByName("RankScene").active = false;
        this.node.getChildByName("zl").getChildByName("rePlay").active = false;
        this.node.getChildByName("fh").getChildByName("rePlay").active = true;
    };
    NewClass.prototype.start = function () {
    };
    NewClass.prototype.update = function (dt) {
        var self = this;
        var Ani;
        var Anistate;
        var PlayOver = false;
        var Countdown = this.node.getChildByName("fh").getChildByName("Countdown").getComponent(cc.Label);
        var time = parseInt(Countdown.string);
        var scheduler = cc.director.getScheduler();
        // scheduler.schedule(aniplayer,this,1,10,1,false);
        this.scheduleOnce(aniplayer, 1); //完成使用schedule的情况下，提示warning的问题。
        /**
         * 结束页面的动画播放
         */
        function aniplayer() {
            var self = this;
            if (time > 0) {
                time--;
            }
            if (time == 0) {
                this.isScheduled = false;
                Ani = self.getComponent(cc.Animation);
                Anistate = Ani.play();
                Countdown.string = time.toString();
                self.node.getChildByName("cd").getChildByName("RankScene").active = true;
                self.node.getChildByName("zl").getChildByName("rePlay").active = true;
                self.node.getChildByName("fh").getChildByName("rePlay").active = false;
                scheduler.pauseTarget(this);
                PlayOver = true;
            }
            Countdown.string = time.toString();
            if (PlayOver) {
                self.scheduleOnce(function () {
                    scheduler.resumeTargets(self);
                    scheduler.pauseAllTargets();
                }, 0.47);
            }
        }
    };
    NewClass = __decorate([
        ccclass
    ], NewClass);
    return NewClass;
}(cc.Component));
exports.default = NewClass;

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, 5644 characters]
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/dici.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, '6716cKnH+ZFHoUln1bHKGgS', 'dici');
// Script/dici.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 });
var Global_1 = require("./Global");
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var NewClass = /** @class */ (function (_super) {
    __extends(NewClass, _super);
    function NewClass() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        /**
         * 落脚点类型 6：地刺
         */
        _this.KIND_FootHold = 6;
        /**
         * player是否落在落脚点上，默认false，没有
         */
        _this.isHold = false;
        _this.NodeH = 80;
        _this.GoUp = false;
        _this.main = null;
        /**
         * 落脚点对应动画
         */
        _this.Ani = null;
        _this.AniState = null;
        _this.gainSc = false;
        _this.InjuredF = false;
        return _this;
    }
    // LIFE-CYCLE CALLBACKS:
    NewClass.prototype.onLoad = function () {
        this.node.y = -500;
        this.node.x = (Math.random() * 2 - 1) * 140;
        this.Ani = this.node.getComponent(cc.Animation);
    };
    NewClass.prototype.start = function () {
    };
    NewClass.prototype.update = function (dt) {
        // console.log(Global.instance.CollisionFlag);
        var self = this;
        if (Global_1.default.instance.OverFlag) {
            self.enabled = false;
        }
        else {
            this.node.active = true;
            this.node.y += Global_1.default.instance.FHFallSpeed;
            if (this.node.isHold) {
                Global_1.default.instance.CollisionFlag = true;
                Global_1.default.instance.TheHolder = this.node;
            }
            if (this.node.y > 360) {
                if (this.node.isHold) {
                    Global_1.default.instance.CollisionFlag = false;
                    this.node.isHold = false;
                }
                this.node.destroy();
            }
        }
    };
    /**
     * 初始化函数
     * @param main 主场景
     */
    NewClass.prototype.init = function (main) {
        this.main = main;
    };
    /**
    * 获取落脚点类型
    */
    NewClass.prototype.getKind = function () {
        return this.KIND_FootHold;
    };
    NewClass.prototype.onCollisionEnter = function (other, self) {
        var rootself = this;
        if (rootself.GoUp) {
            return;
        }
        if (other.tag == 111) {
            console.log("我被撞到了");
            rootself.main.Score();
            rootself.gainSc = true;
            return;
        }
        else {
            Global_1.default.instance.TheHolder = this.node;
            Global_1.default.instance.KIND_FootHold = this.KIND_FootHold;
            rootself.node.isHold = true;
            self.node.isHold = true;
            if (!rootself.InjuredF) {
                Global_1.default.instance.Injured = true;
                rootself.InjuredF = true;
            }
            // this.main.Score();
            if (!Global_1.default.instance.CollisionFlag) {
                Global_1.default.instance.CollisionFlag = true;
                rootself.node.isHold = true;
                self.node.isHold = true;
                rootself.AniState = rootself.Ani.play("dici");
                rootself.AniState.repeatCount = 100;
            }
        }
    };
    __decorate([
        property(Boolean)
    ], NewClass.prototype, "isHold", void 0);
    __decorate([
        property(Number)
    ], NewClass.prototype, "NodeH", void 0);
    NewClass = __decorate([
        ccclass
    ], NewClass);
    return NewClass;
}(cc.Component));
exports.default = NewClass;
/**
 * 地刺的问题貌似还没有解决
 * 不知道哪里有问题
 * 地刺的问题到底是碰撞标志位被修改了。
 *
 */

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, 8176 characters]
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/lvdai.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, 'd80ccPtUvFAGYjYiiCrLHt/', 'lvdai');
// Script/lvdai.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 });
var Global_1 = require("./Global");
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var lvdai = /** @class */ (function (_super) {
    __extends(lvdai, _super);
    function lvdai() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        /**
         * 落脚点类型 3/4：传送带
         */
        _this.KIND_FootHold = 0;
        /**
         * player是否落在落脚点上，默认false，没有
         */
        _this.isHold = false;
        _this.NodeH = 60;
        _this.GoUp = false;
        _this.main = null;
        /**
         * 落脚点对应动画
         */
        _this.Ani = null;
        _this.AniState = null;
        _this.gainSc = false;
        return _this;
    }
    lvdai.prototype.onLoad = function () {
        var kind = Math.random();
        this.node.y = -500;
        this.node.x = (Math.random() * 2 - 1) * 140;
        this.Ani = this.node.getComponent(cc.Animation);
        this.AniState = this.Ani.play("lvdai");
        if (kind <= 0.5) {
            this.KIND_FootHold = 3;
        }
        else {
            this.KIND_FootHold = 4;
            this.AniState.wrapMode = cc.WrapMode.Reverse; //设置动画的播放方式为倒放
        }
        this.AniState.repeatCount = 100;
        this.AniState.speed = 2;
        /**
         * 这里有点问题，设置模式貌似不奏效。一旦成功可以减小包体
         */
    };
    lvdai.prototype.start = function () {
    };
    lvdai.prototype.update = function (dt) {
        // console.log(Global.instance.CollisionFlag);
        var self = this;
        if (Global_1.default.instance.OverFlag) {
            self.enabled = false;
        }
        else {
            this.node.active = true;
            this.node.y += Global_1.default.instance.FHFallSpeed;
            if (this.node.isHold) {
                Global_1.default.instance.CollisionFlag = true;
                Global_1.default.instance.TheHolder = this.node;
            }
            if (this.node.y > 360) {
                if (this.node.isHold) {
                    this.node.isHold = false;
                    Global_1.default.instance.CollisionFlag = false;
                }
                this.node.destroy();
            }
        }
    };
    /**
     * 初始化函数
     * @param main 主场景
     */
    lvdai.prototype.init = function (main) {
        this.main = main;
    };
    /**
     * 获取落脚点类型
     */
    lvdai.prototype.getKind = function () {
        return this.KIND_FootHold;
    };
    lvdai.prototype.onCollisionEnter = function (other, self) {
        var rootself = this; //当前根节点
        if (rootself.GoUp) {
            return;
        }
        Global_1.default.instance.KIND_FootHold = this.KIND_FootHold;
        Global_1.default.instance.TheHolder = this.node;
        if (other.tag == 111) {
            // console.log("我被撞到了");
            rootself.main.Score();
            rootself.gainSc = true;
            return;
        }
        // this.main.Score();
        if (!Global_1.default.instance.CollisionFlag) {
            // console.log(other);
            // console.log("5检测到碰撞！！！");
            // console.log(self);
            self.node.isHold = true;
            Global_1.default.instance.CollisionFlag = true;
        }
    };
    __decorate([
        property(Boolean)
    ], lvdai.prototype, "isHold", void 0);
    __decorate([
        property(Number)
    ], lvdai.prototype, "NodeH", void 0);
    lvdai = __decorate([
        ccclass
    ], lvdai);
    return lvdai;
}(cc.Component));
exports.default = lvdai;

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, 8204 characters]
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/hook.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, 'efbb8F2qG1HU7HLBaRK/Q53', 'hook');
// Script/hook.ts



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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFzc2V0c1xcU2NyaXB0XFxob29rLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJmaWxlIjoiIiwic291cmNlUm9vdCI6Ii8iLCJzb3VyY2VzQ29udGVudCI6WyIgIl19
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/setzIndex.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, 'fe12eibPYBGlpOL5O0Zplim', 'setzIndex');
// Script/setzIndex.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 });
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var NewClass = /** @class */ (function (_super) {
    __extends(NewClass, _super);
    function NewClass() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.zIndex = 0;
        return _this;
        // start () {}
        // update (dt) {}
    }
    NewClass.prototype.onLoad = function () {
        if (this.zIndex % 1 < 1) {
            this.zIndex = 0;
        }
        this.node.zIndex = this.zIndex;
    };
    __decorate([
        property
    ], NewClass.prototype, "zIndex", void 0);
    NewClass = __decorate([
        ccclass
    ], NewClass);
    return NewClass;
}(cc.Component));
exports.default = NewClass;

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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFzc2V0c1xcU2NyaXB0XFxzZXR6SW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQ00sSUFBQSxLQUFzQixFQUFFLENBQUMsVUFBVSxFQUFsQyxPQUFPLGFBQUEsRUFBRSxRQUFRLGNBQWlCLENBQUM7QUFHMUM7SUFBc0MsNEJBQVk7SUFBbEQ7UUFBQSxxRUFnQkM7UUFiRyxZQUFNLEdBQUcsQ0FBQyxDQUFBOztRQVVWLGNBQWM7UUFFZCxpQkFBaUI7SUFDckIsQ0FBQztJQVZHLHlCQUFNLEdBQU47UUFDSSxJQUFHLElBQUksQ0FBQyxNQUFNLEdBQUMsQ0FBQyxHQUFDLENBQUMsRUFBQztZQUNmLElBQUksQ0FBQyxNQUFNLEdBQUcsQ0FBQyxDQUFDO1NBQ25CO1FBQ0QsSUFBSSxDQUFDLElBQUksQ0FBQyxNQUFNLEdBQUcsSUFBSSxDQUFDLE1BQU0sQ0FBQztJQUNuQyxDQUFDO0lBUkQ7UUFEQyxRQUFROzRDQUNDO0lBSE8sUUFBUTtRQUQ1QixPQUFPO09BQ2EsUUFBUSxDQWdCNUI7SUFBRCxlQUFDO0NBaEJELEFBZ0JDLENBaEJxQyxFQUFFLENBQUMsU0FBUyxHQWdCakQ7a0JBaEJvQixRQUFRIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIvIiwic291cmNlc0NvbnRlbnQiOlsiXHJcbmNvbnN0IHtjY2NsYXNzLCBwcm9wZXJ0eX0gPSBjYy5fZGVjb3JhdG9yO1xyXG5cclxuQGNjY2xhc3NcclxuZXhwb3J0IGRlZmF1bHQgY2xhc3MgTmV3Q2xhc3MgZXh0ZW5kcyBjYy5Db21wb25lbnQge1xyXG5cclxuICAgIEBwcm9wZXJ0eVxyXG4gICAgekluZGV4ID0gMFxyXG5cclxuXHJcbiAgICBvbkxvYWQgKCkge1xyXG4gICAgICAgIGlmKHRoaXMuekluZGV4JTE8MSl7XHJcbiAgICAgICAgICAgIHRoaXMuekluZGV4ID0gMDtcclxuICAgICAgICB9XHJcbiAgICAgICAgdGhpcy5ub2RlLnpJbmRleCA9IHRoaXMuekluZGV4O1xyXG4gICAgfVxyXG5cclxuICAgIC8vIHN0YXJ0ICgpIHt9XHJcblxyXG4gICAgLy8gdXBkYXRlIChkdCkge31cclxufVxyXG4iXX0=
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/run.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, '00ba12MFMhHOr9rR+gXBpkj', 'run');
// Script/run.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 });
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var NewClass = /** @class */ (function (_super) {
    __extends(NewClass, _super);
    function NewClass() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.label = null;
        _this.text = 'hello';
        return _this;
        // update (dt) {}
    }
    // LIFE-CYCLE CALLBACKS:
    // onLoad () {}
    NewClass.prototype.start = function () {
    };
    __decorate([
        property(cc.Label)
    ], NewClass.prototype, "label", void 0);
    __decorate([
        property
    ], NewClass.prototype, "text", void 0);
    NewClass = __decorate([
        ccclass
    ], NewClass);
    return NewClass;
}(cc.Component));
exports.default = NewClass;

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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFzc2V0c1xcU2NyaXB0XFxydW4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQU0sSUFBQSxLQUFzQixFQUFFLENBQUMsVUFBVSxFQUFsQyxPQUFPLGFBQUEsRUFBRSxRQUFRLGNBQWlCLENBQUM7QUFHMUM7SUFBc0MsNEJBQVk7SUFBbEQ7UUFBQSxxRUFpQkM7UUFkRyxXQUFLLEdBQWEsSUFBSSxDQUFDO1FBR3ZCLFVBQUksR0FBVyxPQUFPLENBQUM7O1FBVXZCLGlCQUFpQjtJQUNyQixDQUFDO0lBVEcsd0JBQXdCO0lBRXhCLGVBQWU7SUFFZix3QkFBSyxHQUFMO0lBRUEsQ0FBQztJQVhEO1FBREMsUUFBUSxDQUFDLEVBQUUsQ0FBQyxLQUFLLENBQUM7MkNBQ0k7SUFHdkI7UUFEQyxRQUFROzBDQUNjO0lBTk4sUUFBUTtRQUQ1QixPQUFPO09BQ2EsUUFBUSxDQWlCNUI7SUFBRCxlQUFDO0NBakJELEFBaUJDLENBakJxQyxFQUFFLENBQUMsU0FBUyxHQWlCakQ7a0JBakJvQixRQUFRIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIvIiwic291cmNlc0NvbnRlbnQiOlsiY29uc3Qge2NjY2xhc3MsIHByb3BlcnR5fSA9IGNjLl9kZWNvcmF0b3I7XHJcblxyXG5AY2NjbGFzc1xyXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBOZXdDbGFzcyBleHRlbmRzIGNjLkNvbXBvbmVudCB7XHJcblxyXG4gICAgQHByb3BlcnR5KGNjLkxhYmVsKVxyXG4gICAgbGFiZWw6IGNjLkxhYmVsID0gbnVsbDtcclxuXHJcbiAgICBAcHJvcGVydHlcclxuICAgIHRleHQ6IHN0cmluZyA9ICdoZWxsbyc7XHJcblxyXG4gICAgLy8gTElGRS1DWUNMRSBDQUxMQkFDS1M6XHJcblxyXG4gICAgLy8gb25Mb2FkICgpIHt9XHJcblxyXG4gICAgc3RhcnQgKCkge1xyXG5cclxuICAgIH1cclxuXHJcbiAgICAvLyB1cGRhdGUgKGR0KSB7fVxyXG59XHJcbiJdfQ==
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/shandian.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, '87882UfG1FGHpfsHlS2GHjW', 'shandian');
// Script/shandian.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 });
var Global_1 = require("./Global");
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var shandian = /** @class */ (function (_super) {
    __extends(shandian, _super);
    function shandian() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        /**
         * 落脚点类型 8：闪电
         */
        _this.KIND_FootHold = 8;
        /**
         * player是否落在落脚点上，默认false，没有
         */
        _this.isHold = false;
        _this.NodeH = 50;
        _this.main = null;
        /**
         * 落脚点对应动画
         */
        _this.Ani = null;
        _this.AniState = null;
        _this.gainSc = false;
        return _this;
    }
    shandian.prototype.onLoad = function () {
        this.node.y = -500;
        this.node.x = (Math.random() * 2 - 1) * 140;
        this.Ani = this.node.getComponent(cc.Animation);
        this.AniState = this.Ani.play("shandian");
        this.AniState.repeatCount = 100;
    };
    shandian.prototype.start = function () {
    };
    shandian.prototype.update = function (dt) {
        // console.log(Global.instance.CollisionFlag);
        var self = this;
        if (Global_1.default.instance.OverFlag) {
            self.enabled = false;
        }
        else {
            this.node.active = true;
            this.node.y += Global_1.default.instance.FHFallSpeed;
            if (this.node.isHold) {
                Global_1.default.instance.CollisionFlag = true;
                Global_1.default.instance.TheHolder = this.node;
            }
            if (this.node.y > 360) {
                if (this.node.isHold) {
                    this.node.isHold = false;
                    Global_1.default.instance.CollisionFlag = false;
                }
                this.node.destroy();
            }
        }
    };
    /**
     * 初始化函数
     * @param main 主场景
     */
    shandian.prototype.init = function (main) {
        this.main = main;
    };
    /**
     * 获取落脚点类型
     */
    shandian.prototype.getKind = function () {
        return this.KIND_FootHold;
    };
    shandian.prototype.onCollisionEnter = function (other, self) {
        var rootself = this;
        switch (other.tag) {
            case 0: {
                Global_1.default.instance.KIND_FootHold = this.KIND_FootHold;
                Global_1.default.instance.TheHolder = this.node;
                Global_1.default.instance.Injured = true;
                break;
            }
            case 111: {
                console.log("我被撞到了");
                rootself.main.Score();
                rootself.gainSc = true;
                return;
            }
        }
        // this.main.Score();
        if (!Global_1.default.instance.CollisionFlag) {
            self.node.isHold = false;
            Global_1.default.instance.CollisionFlag = false;
        }
    };
    __decorate([
        property(Boolean)
    ], shandian.prototype, "isHold", void 0);
    __decorate([
        property(Number)
    ], shandian.prototype, "NodeH", void 0);
    shandian = __decorate([
        ccclass
    ], shandian);
    return shandian;
}(cc.Component));
exports.default = shandian;

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, 7208 characters]
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/stand.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, '20145bXCCFC36/QUBySlNEb', 'stand');
// Script/stand.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 });
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var NewClass = /** @class */ (function (_super) {
    __extends(NewClass, _super);
    function NewClass() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.label = null;
        _this.text = 'hello';
        return _this;
        // update (dt) {}
    }
    // LIFE-CYCLE CALLBACKS:
    // onLoad () {}
    NewClass.prototype.start = function () {
    };
    __decorate([
        property(cc.Label)
    ], NewClass.prototype, "label", void 0);
    __decorate([
        property
    ], NewClass.prototype, "text", void 0);
    NewClass = __decorate([
        ccclass
    ], NewClass);
    return NewClass;
}(cc.Component));
exports.default = NewClass;

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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFzc2V0c1xcU2NyaXB0XFxzdGFuZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBTSxJQUFBLEtBQXNCLEVBQUUsQ0FBQyxVQUFVLEVBQWxDLE9BQU8sYUFBQSxFQUFFLFFBQVEsY0FBaUIsQ0FBQztBQUcxQztJQUFzQyw0QkFBWTtJQUFsRDtRQUFBLHFFQWlCQztRQWRHLFdBQUssR0FBYSxJQUFJLENBQUM7UUFHdkIsVUFBSSxHQUFXLE9BQU8sQ0FBQzs7UUFVdkIsaUJBQWlCO0lBQ3JCLENBQUM7SUFURyx3QkFBd0I7SUFFeEIsZUFBZTtJQUVmLHdCQUFLLEdBQUw7SUFFQSxDQUFDO0lBWEQ7UUFEQyxRQUFRLENBQUMsRUFBRSxDQUFDLEtBQUssQ0FBQzsyQ0FDSTtJQUd2QjtRQURDLFFBQVE7MENBQ2M7SUFOTixRQUFRO1FBRDVCLE9BQU87T0FDYSxRQUFRLENBaUI1QjtJQUFELGVBQUM7Q0FqQkQsQUFpQkMsQ0FqQnFDLEVBQUUsQ0FBQyxTQUFTLEdBaUJqRDtrQkFqQm9CLFFBQVEiLCJmaWxlIjoiIiwic291cmNlUm9vdCI6Ii8iLCJzb3VyY2VzQ29udGVudCI6WyJjb25zdCB7Y2NjbGFzcywgcHJvcGVydHl9ID0gY2MuX2RlY29yYXRvcjtcclxuXHJcbkBjY2NsYXNzXHJcbmV4cG9ydCBkZWZhdWx0IGNsYXNzIE5ld0NsYXNzIGV4dGVuZHMgY2MuQ29tcG9uZW50IHtcclxuXHJcbiAgICBAcHJvcGVydHkoY2MuTGFiZWwpXHJcbiAgICBsYWJlbDogY2MuTGFiZWwgPSBudWxsO1xyXG5cclxuICAgIEBwcm9wZXJ0eVxyXG4gICAgdGV4dDogc3RyaW5nID0gJ2hlbGxvJztcclxuXHJcbiAgICAvLyBMSUZFLUNZQ0xFIENBTExCQUNLUzpcclxuXHJcbiAgICAvLyBvbkxvYWQgKCkge31cclxuXHJcbiAgICBzdGFydCAoKSB7XHJcblxyXG4gICAgfVxyXG5cclxuICAgIC8vIHVwZGF0ZSAoZHQpIHt9XHJcbn1cclxuIl19
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/EndScene.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, 'a00e52IsyBExZnsc9QD67mN', 'EndScene');
// Script/EndScene.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 });
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var NewClass = /** @class */ (function (_super) {
    __extends(NewClass, _super);
    function NewClass() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        //需要更多源码联系Q:852183691
        //或者
        //关注微信公众号“史于二”
        _this.RankInfo = null;
        _this.rannode = null;
        // LIFE-CYCLE CALLBACKS:
        _this.Ani = null;
        _this.Anistate = null;
        _this.rInfo = null;
        return _this;
    }
    NewClass.prototype.onLoad = function () {
        this.rInfo = cc.instantiate(this.RankInfo);
        this.rannode.addChild(this.rInfo);
    };
    NewClass.prototype.start = function () {
        this.PlayAni();
    };
    NewClass.prototype.update = function (dt) {
        // cc.systemEvent.on(cc.SystemEvent.EventType.KEY_DOWN,this.onKeyDown,this);
    };
    /**
     * 排行榜的动画播放
     */
    NewClass.prototype.PlayAni = function () {
        this.Ani = this.rInfo.getComponent(cc.Animation);
        this.scheduleOnce(function () {
            this.Anistate = this.Ani.play();
        });
    };
    __decorate([
        property(cc.Prefab)
    ], NewClass.prototype, "RankInfo", void 0);
    __decorate([
        property(cc.Node)
    ], NewClass.prototype, "rannode", void 0);
    NewClass = __decorate([
        ccclass
    ], NewClass);
    return NewClass;
}(cc.Component));
exports.default = NewClass;

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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFzc2V0c1xcU2NyaXB0XFxFbmRTY2VuZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBTSxJQUFBLEtBQXNCLEVBQUUsQ0FBQyxVQUFVLEVBQWxDLE9BQU8sYUFBQSxFQUFFLFFBQVEsY0FBaUIsQ0FBQztBQUcxQztJQUFzQyw0QkFBWTtJQUFsRDtRQUFBLHFFQXVDQztRQXJDRCxxQkFBcUI7UUFDckIsSUFBSTtRQUNKLGNBQWM7UUFFVixjQUFRLEdBQWEsSUFBSSxDQUFDO1FBRTFCLGFBQU8sR0FBVyxJQUFJLENBQUM7UUFDdkIsd0JBQXdCO1FBQ3hCLFNBQUcsR0FBRyxJQUFJLENBQUM7UUFDWCxjQUFRLEdBQUcsSUFBSSxDQUFDO1FBQ2hCLFdBQUssR0FBSSxJQUFJLENBQUM7O0lBMkJsQixDQUFDO0lBMUJHLHlCQUFNLEdBQU47UUFDSSxJQUFJLENBQUMsS0FBSyxHQUFHLEVBQUUsQ0FBQyxXQUFXLENBQUMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxDQUFDO1FBQzNDLElBQUksQ0FBQyxPQUFPLENBQUMsUUFBUSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsQ0FBQztJQUN0QyxDQUFDO0lBRUQsd0JBQUssR0FBTDtRQUNJLElBQUksQ0FBQyxPQUFPLEVBQUUsQ0FBQztJQUNuQixDQUFDO0lBRUQseUJBQU0sR0FBTixVQUFRLEVBQUU7UUFFUCw0RUFBNEU7SUFDL0UsQ0FBQztJQUVEOztPQUVHO0lBQ0gsMEJBQU8sR0FBUDtRQUNJLElBQUksQ0FBQyxHQUFHLEdBQUcsSUFBSSxDQUFDLEtBQUssQ0FBQyxZQUFZLENBQUMsRUFBRSxDQUFDLFNBQVMsQ0FBQyxDQUFDO1FBQ2pELElBQUksQ0FBQyxZQUFZLENBQUM7WUFDZCxJQUFJLENBQUMsUUFBUSxHQUFHLElBQUksQ0FBQyxHQUFHLENBQUMsSUFBSSxFQUFFLENBQUM7UUFFcEMsQ0FBQyxDQUFDLENBQUE7SUFDTixDQUFDO0lBOUJEO1FBREMsUUFBUSxDQUFDLEVBQUUsQ0FBQyxNQUFNLENBQUM7OENBQ007SUFFMUI7UUFERixRQUFRLENBQUMsRUFBRSxDQUFDLElBQUksQ0FBQzs2Q0FDUTtJQVJOLFFBQVE7UUFENUIsT0FBTztPQUNhLFFBQVEsQ0F1QzVCO0lBQUQsZUFBQztDQXZDRCxBQXVDQyxDQXZDcUMsRUFBRSxDQUFDLFNBQVMsR0F1Q2pEO2tCQXZDb0IsUUFBUSIsImZpbGUiOiIiLCJzb3VyY2VSb290IjoiLyIsInNvdXJjZXNDb250ZW50IjpbImNvbnN0IHtjY2NsYXNzLCBwcm9wZXJ0eX0gPSBjYy5fZGVjb3JhdG9yO1xyXG5cclxuQGNjY2xhc3NcclxuZXhwb3J0IGRlZmF1bHQgY2xhc3MgTmV3Q2xhc3MgZXh0ZW5kcyBjYy5Db21wb25lbnQge1xyXG5cclxuLy/pnIDopoHmm7TlpJrmupDnoIHogZTns7tROjg1MjE4MzY5MVxyXG4vL+aIluiAhVxyXG4vL+WFs+azqOW+ruS/oeWFrOS8l+WPt+KAnOWPsuS6juS6jOKAnVxyXG4gICAgQHByb3BlcnR5KGNjLlByZWZhYilcclxuICAgIFJhbmtJbmZvOmNjLlByZWZhYiA9IG51bGw7XHJcblx0QHByb3BlcnR5KGNjLk5vZGUpXHJcbiAgICByYW5ub2RlOmNjLk5vZGUgPSBudWxsO1xyXG4gICAgLy8gTElGRS1DWUNMRSBDQUxMQkFDS1M6XHJcbiAgICBBbmkgPSBudWxsO1xyXG4gICAgQW5pc3RhdGUgPSBudWxsO1xyXG4gICAgckluZm8gPSAgbnVsbDtcclxuICAgIG9uTG9hZCAoKSB7XHJcbiAgICAgICAgdGhpcy5ySW5mbyA9IGNjLmluc3RhbnRpYXRlKHRoaXMuUmFua0luZm8pO1xyXG4gICAgICAgIHRoaXMucmFubm9kZS5hZGRDaGlsZCh0aGlzLnJJbmZvKTtcclxuICAgIH1cclxuXHJcbiAgICBzdGFydCAoKSB7XHJcbiAgICAgICAgdGhpcy5QbGF5QW5pKCk7XHJcbiAgICB9XHJcblxyXG4gICAgdXBkYXRlIChkdCkge1xyXG4gICAgICAgIFxyXG4gICAgICAgLy8gY2Muc3lzdGVtRXZlbnQub24oY2MuU3lzdGVtRXZlbnQuRXZlbnRUeXBlLktFWV9ET1dOLHRoaXMub25LZXlEb3duLHRoaXMpO1xyXG4gICAgfVxyXG5cclxuICAgIC8qKlxyXG4gICAgICog5o6S6KGM5qac55qE5Yqo55S75pKt5pS+XHJcbiAgICAgKi9cclxuICAgIFBsYXlBbmkoKXtcclxuICAgICAgICB0aGlzLkFuaSA9IHRoaXMuckluZm8uZ2V0Q29tcG9uZW50KGNjLkFuaW1hdGlvbik7XHJcbiAgICAgICAgdGhpcy5zY2hlZHVsZU9uY2UoZnVuY3Rpb24oKXtcclxuICAgICAgICAgICAgdGhpcy5BbmlzdGF0ZSA9IHRoaXMuQW5pLnBsYXkoKTtcclxuICAgICAgICAgICAgXHJcbiAgICAgICAgfSlcclxuICAgIH1cclxuXHJcbiAgXHJcbn1cclxuIl19
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/runRight.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, '852955JeQZA3b0Sd7F/2V9x', 'runRight');
// Script/runRight.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 });
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var NewClass = /** @class */ (function (_super) {
    __extends(NewClass, _super);
    function NewClass() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.label = null;
        _this.text = 'hello';
        return _this;
        // update (dt) {}
    }
    // LIFE-CYCLE CALLBACKS:
    // onLoad () {}
    NewClass.prototype.start = function () {
    };
    __decorate([
        property(cc.Label)
    ], NewClass.prototype, "label", void 0);
    __decorate([
        property
    ], NewClass.prototype, "text", void 0);
    NewClass = __decorate([
        ccclass
    ], NewClass);
    return NewClass;
}(cc.Component));
exports.default = NewClass;

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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFzc2V0c1xcU2NyaXB0XFxydW5SaWdodC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFDTSxJQUFBLEtBQXNCLEVBQUUsQ0FBQyxVQUFVLEVBQWxDLE9BQU8sYUFBQSxFQUFFLFFBQVEsY0FBaUIsQ0FBQztBQUcxQztJQUFzQyw0QkFBWTtJQUFsRDtRQUFBLHFFQWlCQztRQWRHLFdBQUssR0FBYSxJQUFJLENBQUM7UUFHdkIsVUFBSSxHQUFXLE9BQU8sQ0FBQzs7UUFVdkIsaUJBQWlCO0lBQ3JCLENBQUM7SUFURyx3QkFBd0I7SUFFeEIsZUFBZTtJQUVmLHdCQUFLLEdBQUw7SUFFQSxDQUFDO0lBWEQ7UUFEQyxRQUFRLENBQUMsRUFBRSxDQUFDLEtBQUssQ0FBQzsyQ0FDSTtJQUd2QjtRQURDLFFBQVE7MENBQ2M7SUFOTixRQUFRO1FBRDVCLE9BQU87T0FDYSxRQUFRLENBaUI1QjtJQUFELGVBQUM7Q0FqQkQsQUFpQkMsQ0FqQnFDLEVBQUUsQ0FBQyxTQUFTLEdBaUJqRDtrQkFqQm9CLFFBQVEiLCJmaWxlIjoiIiwic291cmNlUm9vdCI6Ii8iLCJzb3VyY2VzQ29udGVudCI6WyJcclxuY29uc3Qge2NjY2xhc3MsIHByb3BlcnR5fSA9IGNjLl9kZWNvcmF0b3I7XHJcblxyXG5AY2NjbGFzc1xyXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBOZXdDbGFzcyBleHRlbmRzIGNjLkNvbXBvbmVudCB7XHJcblxyXG4gICAgQHByb3BlcnR5KGNjLkxhYmVsKVxyXG4gICAgbGFiZWw6IGNjLkxhYmVsID0gbnVsbDtcclxuXHJcbiAgICBAcHJvcGVydHlcclxuICAgIHRleHQ6IHN0cmluZyA9ICdoZWxsbyc7XHJcblxyXG4gICAgLy8gTElGRS1DWUNMRSBDQUxMQkFDS1M6XHJcblxyXG4gICAgLy8gb25Mb2FkICgpIHt9XHJcblxyXG4gICAgc3RhcnQgKCkge1xyXG5cclxuICAgIH1cclxuXHJcbiAgICAvLyB1cGRhdGUgKGR0KSB7fVxyXG59XHJcbiJdfQ==
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/CliGD.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, '2fd09PdJPRLiqn3k0n9lg6t', 'CliGD');
// Script/CliGD.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 });
var Global_1 = require("./Global");
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var NewClass = /** @class */ (function (_super) {
    __extends(NewClass, _super);
    function NewClass() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        /**0 for right */
        _this.CliLorR = 0;
        return _this;
    }
    NewClass.prototype.onLoad = function () {
        if (Math.random() < 0.5) {
            this.CliLorR = 0;
        }
        else {
            this.CliLorR = 1;
        }
    };
    NewClass.prototype.start = function () {
    };
    NewClass.prototype.update = function (dt) {
        if (this.CliLorR == 0) {
            this.node.parent.x++;
            var x = this.node.parent.isHold;
            if (x || this.node.parent.getComponent("GD").isHold) {
                Global_1.default.instance.LorR = 0;
            }
        }
        else {
            this.node.parent.x--;
            var x = this.node.parent.isHold;
            if (x || this.node.parent.getComponent("GD").isHold) {
                Global_1.default.instance.LorR = 1;
            }
        }
    };
    NewClass.prototype.onCollisionEnter = function () {
        var self = this;
        if (self.CliLorR == 0) {
            self.CliLorR = 1;
            Global_1.default.instance.LorR = 1;
            // console.log("这里是CliGD的if"+Global.instance.LorR);
        }
        else {
            self.CliLorR = 0;
            Global_1.default.instance.LorR = 0;
            // console.log("这里是CliGD的else"+Global.instance.LorR);
        }
    };
    __decorate([
        property(Number)
    ], NewClass.prototype, "CliLorR", void 0);
    NewClass = __decorate([
        ccclass
    ], NewClass);
    return NewClass;
}(cc.Component));
exports.default = NewClass;

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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFzc2V0c1xcU2NyaXB0XFxDbGlHRC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxtQ0FBOEI7QUFFeEIsSUFBQSxLQUFzQixFQUFFLENBQUMsVUFBVSxFQUFsQyxPQUFPLGFBQUEsRUFBRSxRQUFRLGNBQWlCLENBQUM7QUFHMUM7SUFBc0MsNEJBQVk7SUFBbEQ7UUFBQSxxRUFpREM7UUFoREcsaUJBQWlCO1FBRWpCLGFBQU8sR0FBVSxDQUFDLENBQUM7O0lBOEN2QixDQUFDO0lBM0NHLHlCQUFNLEdBQU47UUFDSSxJQUFHLElBQUksQ0FBQyxNQUFNLEVBQUUsR0FBQyxHQUFHLEVBQUM7WUFDakIsSUFBSSxDQUFDLE9BQU8sR0FBRyxDQUFDLENBQUM7U0FDcEI7YUFDRztZQUNBLElBQUksQ0FBQyxPQUFPLEdBQUcsQ0FBQyxDQUFDO1NBQ3BCO0lBQ0wsQ0FBQztJQUVELHdCQUFLLEdBQUw7SUFFQSxDQUFDO0lBRUQseUJBQU0sR0FBTixVQUFRLEVBQUU7UUFDTixJQUFHLElBQUksQ0FBQyxPQUFPLElBQUUsQ0FBQyxFQUFDO1lBQ2YsSUFBSSxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQyxFQUFFLENBQUM7WUFDckIsSUFBSSxDQUFDLEdBQUcsSUFBSSxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsTUFBTSxDQUFDO1lBQ2hDLElBQUcsQ0FBQyxJQUFFLElBQUksQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLFlBQVksQ0FBQyxJQUFJLENBQUMsQ0FBQyxNQUFNLEVBQUM7Z0JBQzdDLGdCQUFNLENBQUMsUUFBUSxDQUFDLElBQUksR0FBRyxDQUFDLENBQUM7YUFDNUI7U0FDSjthQUNHO1lBQ0EsSUFBSSxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQyxFQUFFLENBQUM7WUFDckIsSUFBSSxDQUFDLEdBQUcsSUFBSSxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsTUFBTSxDQUFDO1lBQ2hDLElBQUcsQ0FBQyxJQUFFLElBQUksQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLFlBQVksQ0FBQyxJQUFJLENBQUMsQ0FBQyxNQUFNLEVBQUM7Z0JBQzdDLGdCQUFNLENBQUMsUUFBUSxDQUFDLElBQUksR0FBRyxDQUFDLENBQUM7YUFDNUI7U0FDSjtJQUNMLENBQUM7SUFFRCxtQ0FBZ0IsR0FBaEI7UUFDSSxJQUFJLElBQUksR0FBRyxJQUFJLENBQUM7UUFDaEIsSUFBRyxJQUFJLENBQUMsT0FBTyxJQUFJLENBQUMsRUFBQztZQUNqQixJQUFJLENBQUMsT0FBTyxHQUFHLENBQUMsQ0FBQztZQUNqQixnQkFBTSxDQUFDLFFBQVEsQ0FBQyxJQUFJLEdBQUcsQ0FBQyxDQUFDO1lBQ3pCLG1EQUFtRDtTQUN0RDthQUNHO1lBQ0EsSUFBSSxDQUFDLE9BQU8sR0FBRyxDQUFDLENBQUM7WUFDakIsZ0JBQU0sQ0FBQyxRQUFRLENBQUMsSUFBSSxHQUFHLENBQUMsQ0FBQztZQUN6QixxREFBcUQ7U0FDeEQ7SUFDTCxDQUFDO0lBN0NEO1FBREMsUUFBUSxDQUFDLE1BQU0sQ0FBQzs2Q0FDRTtJQUhGLFFBQVE7UUFENUIsT0FBTztPQUNhLFFBQVEsQ0FpRDVCO0lBQUQsZUFBQztDQWpERCxBQWlEQyxDQWpEcUMsRUFBRSxDQUFDLFNBQVMsR0FpRGpEO2tCQWpEb0IsUUFBUSIsImZpbGUiOiIiLCJzb3VyY2VSb290IjoiLyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBHbG9iYWwgZnJvbSBcIi4vR2xvYmFsXCI7XHJcblxyXG5jb25zdCB7Y2NjbGFzcywgcHJvcGVydHl9ID0gY2MuX2RlY29yYXRvcjtcclxuXHJcbkBjY2NsYXNzXHJcbmV4cG9ydCBkZWZhdWx0IGNsYXNzIE5ld0NsYXNzIGV4dGVuZHMgY2MuQ29tcG9uZW50IHtcclxuICAgIC8qKjAgZm9yIHJpZ2h0ICovXHJcbiAgICBAcHJvcGVydHkoTnVtYmVyKVxyXG4gICAgQ2xpTG9yUjpOdW1iZXIgPSAwO1xyXG5cclxuXHJcbiAgICBvbkxvYWQgKCkge1xyXG4gICAgICAgIGlmKE1hdGgucmFuZG9tKCk8MC41KXtcclxuICAgICAgICAgICAgdGhpcy5DbGlMb3JSID0gMDtcclxuICAgICAgICB9XHJcbiAgICAgICAgZWxzZXtcclxuICAgICAgICAgICAgdGhpcy5DbGlMb3JSID0gMTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgc3RhcnQgKCkge1xyXG5cclxuICAgIH1cclxuXHJcbiAgICB1cGRhdGUgKGR0KSB7XHJcbiAgICAgICAgaWYodGhpcy5DbGlMb3JSPT0wKXtcclxuICAgICAgICAgICAgdGhpcy5ub2RlLnBhcmVudC54Kys7XHJcbiAgICAgICAgICAgIGxldCB4ID0gdGhpcy5ub2RlLnBhcmVudC5pc0hvbGQ7XHJcbiAgICAgICAgICAgIGlmKHh8fHRoaXMubm9kZS5wYXJlbnQuZ2V0Q29tcG9uZW50KFwiR0RcIikuaXNIb2xkKXtcclxuICAgICAgICAgICAgICAgIEdsb2JhbC5pbnN0YW5jZS5Mb3JSID0gMDtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNle1xyXG4gICAgICAgICAgICB0aGlzLm5vZGUucGFyZW50LngtLTtcclxuICAgICAgICAgICAgbGV0IHggPSB0aGlzLm5vZGUucGFyZW50LmlzSG9sZDtcclxuICAgICAgICAgICAgaWYoeHx8dGhpcy5ub2RlLnBhcmVudC5nZXRDb21wb25lbnQoXCJHRFwiKS5pc0hvbGQpe1xyXG4gICAgICAgICAgICAgICAgR2xvYmFsLmluc3RhbmNlLkxvclIgPSAxO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIG9uQ29sbGlzaW9uRW50ZXIoKXtcclxuICAgICAgICBsZXQgc2VsZiA9IHRoaXM7XHJcbiAgICAgICAgaWYoc2VsZi5DbGlMb3JSID09IDApe1xyXG4gICAgICAgICAgICBzZWxmLkNsaUxvclIgPSAxO1xyXG4gICAgICAgICAgICBHbG9iYWwuaW5zdGFuY2UuTG9yUiA9IDE7XHJcbiAgICAgICAgICAgIC8vIGNvbnNvbGUubG9nKFwi6L+Z6YeM5pivQ2xpR0TnmoRpZlwiK0dsb2JhbC5pbnN0YW5jZS5Mb3JSKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgZWxzZXtcclxuICAgICAgICAgICAgc2VsZi5DbGlMb3JSID0gMDtcclxuICAgICAgICAgICAgR2xvYmFsLmluc3RhbmNlLkxvclIgPSAwO1xyXG4gICAgICAgICAgICAvLyBjb25zb2xlLmxvZyhcIui/memHjOaYr0NsaUdE55qEZWxzZVwiK0dsb2JhbC5pbnN0YW5jZS5Mb3JSKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbn1cclxuIl19
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/Opplvdai.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, 'c3fcdYkt9FMtJg2+HeTUXjw', 'Opplvdai');
// Script/Opplvdai.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 });
var Global_1 = require("./Global");
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var Opplvdai = /** @class */ (function (_super) {
    __extends(Opplvdai, _super);
    function Opplvdai() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        /**
         * 落脚点类型 2：向右传送带
         */
        _this.KIND_FootHold = 2;
        /**
         * player是否落在落脚点上，默认false，没有
         */
        _this.isHold = false;
        _this.NodeH = 69;
        _this.GoUp = false;
        _this.main = null;
        /**
         * 落脚点对应动画
         */
        _this.Ani = null;
        _this.AniState = null;
        _this.gainSc = false;
        return _this;
    }
    Opplvdai.prototype.onLoad = function () {
        this.node.y = -500;
        this.node.x = (Math.random() * 2 - 1) * 140;
        this.Ani = this.node.getComponent(cc.Animation);
        this.AniState = this.Ani.play("Opplvdai");
        this.AniState.repeatCount = 100;
        this.AniState.speed = 2;
    };
    Opplvdai.prototype.start = function () {
    };
    Opplvdai.prototype.update = function (dt) {
        // console.log(Global.instance.CollisionFlag);
        var self = this;
        if (Global_1.default.instance.OverFlag) {
            self.enabled = false;
        }
        else {
            this.node.active = true;
            this.node.y += Global_1.default.instance.FHFallSpeed;
            if (this.node.isHold) {
                Global_1.default.instance.CollisionFlag = true;
                Global_1.default.instance.TheHolder = this.node;
            }
            if (this.node.y > 360) {
                if (this.node.isHold) {
                    this.node.isHold = false;
                    Global_1.default.instance.CollisionFlag = false;
                }
                this.node.destroy();
            }
        }
    };
    /**
     * 初始化函数
     * @param main 主场景
     */
    Opplvdai.prototype.init = function (main) {
        this.main = main;
    };
    /**
     * 获取落脚点类型
     */
    Opplvdai.prototype.getKind = function () {
        return this.KIND_FootHold;
    };
    Opplvdai.prototype.onCollisionEnter = function (other, self) {
        var rootself = this; //当前根节点
        if (rootself.GoUp) {
            return;
        }
        Global_1.default.instance.KIND_FootHold = this.KIND_FootHold;
        Global_1.default.instance.TheHolder = this.node;
        if (other.tag == 111) {
            console.log("我被撞到了");
            rootself.main.Score();
            rootself.gainSc = true;
            rootself.GoUp = true;
            return;
        }
        // this.main.Score();
        if (!Global_1.default.instance.CollisionFlag) {
            // console.log(other);
            // console.log("2检测到碰撞！！！");
            // console.log(self);
            // other.node.y = this.node.y+50;
            self.node.isHold = true;
            Global_1.default.instance.CollisionFlag = true;
        }
    };
    __decorate([
        property(Boolean)
    ], Opplvdai.prototype, "isHold", void 0);
    __decorate([
        property(Number)
    ], Opplvdai.prototype, "NodeH", void 0);
    Opplvdai = __decorate([
        ccclass
    ], Opplvdai);
    return Opplvdai;
}(cc.Component));
exports.default = Opplvdai;

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, 7556 characters]
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/tanhuang.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, 'aa287RDrGdFu4EArMpW55C/', 'tanhuang');
// Script/tanhuang.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 });
var Global_1 = require("./Global");
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var tanhuang = /** @class */ (function (_super) {
    __extends(tanhuang, _super);
    function tanhuang() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        /**
         * 落脚点类型 2：tanhuang
         */
        _this.KIND_FootHold = 2;
        /**
         * player是否落在落脚点上，默认false，没有
         */
        _this.isHold = false;
        _this.NodeH = 60;
        _this.GoUp = false;
        _this.gainSc = false; //弹簧加分标志
        _this.main = null;
        /**
         * 落脚点对应动画
         */
        _this.Ani = null;
        _this.AniState = null;
        return _this;
    }
    tanhuang.prototype.onLoad = function () {
        this.node.y = -500;
        this.node.x = (Math.random() * 2 - 1) * 140;
        this.Ani = this.node.getComponent(cc.Animation);
        this.gainSc = false;
    };
    tanhuang.prototype.start = function () {
        this.Ding = this.main.node.getChildByName("BgNode").getChildByName("LifeDing").getChildByName("ding");
    };
    tanhuang.prototype.update = function (dt) {
        // console.log(Global.instance.CollisionFlag);
        var self = this;
        if (Global_1.default.instance.OverFlag) {
            self.enabled = false;
        }
        else {
            this.node.active = true;
            this.node.y += Global_1.default.instance.FHFallSpeed;
            if (this.node.isHold) {
                Global_1.default.instance.CollisionFlag = true;
                Global_1.default.instance.TheHolder = this.node;
            }
            if (this.node.y > 360) {
                if (this.node.isHold) {
                    Global_1.default.instance.CollisionFlag = false;
                    this.node.isHold = false;
                }
                this.node.destroy();
            }
        }
    };
    /**
     * 初始化函数
     * @param main 主场景
     */
    tanhuang.prototype.init = function (main) {
        this.main = main;
    };
    /**
     * 获取落脚点类型
     */
    tanhuang.prototype.getKind = function () {
        return this.KIND_FootHold;
    };
    /**
     * 碰撞
     * @param other 碰撞主体player
     * @param self 碰撞主体落脚点tanhuang
     */
    tanhuang.prototype.onCollisionEnter = function (other, self) {
        var rootself = this;
        if (rootself.GoUp) {
            return;
        }
        if (rootself.main == null) {
            rootself.main = Global_1.default.instance.getMN();
        }
        if (other.tag === 111) {
            if (rootself.gainSc == false) {
                rootself.main.Score();
                rootself.gainSc = true;
                rootself.GoUp = true;
            }
            return;
        }
        else {
            Global_1.default.instance.KIND_FootHold = rootself.KIND_FootHold;
            if (!Global_1.default.instance.CollisionFlag) {
                Global_1.default.instance.CollisionFlag = true;
                Global_1.default.instance.TheHolder = rootself.node;
                rootself.isHold = true;
                other.node.y = self.node.y + 60;
                var spawn = void 0;
                spawn = cc.spawn(cc.callFunc(function () {
                    if (rootself.Ani == null) {
                        return;
                    }
                    rootself.AniState = rootself.Ani.play("tanhuang");
                    rootself.AniState.speed = 0.8;
                }), cc.callFunc(function () {
                    other.node.runAction(cc.moveBy(0.15, 0, 50));
                    Global_1.default.instance.CollisionFlag = false;
                    rootself.isHold = false;
                    other.node.getComponent("Playcontroler").enabled = false;
                }));
                rootself.scheduleOnce(function () {
                    other.node.getComponent("Playcontroler").enabled = true;
                }, 0.27);
                rootself.scheduleOnce(function () {
                    // console.log(Global.instance.CollisionFlag+"5")
                    Global_1.default.instance.CollisionFlag = false;
                    rootself.isHold = false;
                    rootself.Ani.stop();
                }, 0.41);
                other.node.runAction(spawn);
            }
        }
    };
    __decorate([
        property(Boolean)
    ], tanhuang.prototype, "isHold", void 0);
    __decorate([
        property(Number)
    ], tanhuang.prototype, "NodeH", void 0);
    tanhuang = __decorate([
        ccclass
    ], tanhuang);
    return tanhuang;
}(cc.Component));
exports.default = tanhuang;

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, 10896 characters]
//------QC-SOURCE-SPLIT------
