From 51a36e71511a25a4d6ee5966b89026e014d70f10 Mon Sep 17 00:00:00 2001 From: "COMPUTER\\EDY" <249929363@qq.com> Date: Mon, 5 Jan 2026 10:22:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BA=A0=E9=94=99=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=EF=BC=8C=E4=BF=AE=E6=94=B9=E4=B8=A4=E4=B8=AA=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E5=85=B3=E5=8D=A1=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/Script/Block.ts | 31 +- assets/Script/GameManager.ts | 4 + assets/Script/JiaZai.ts | 37 +- assets/Script/Map.ts | 9 +- assets/Script/lq_collide_system/lq_collide.ts | 12 +- assets/Script/module/Config/GameConfig.ts | 3 + assets/Script/module/Tool/GameTool.ts | 54 ++ assets/TextureBlock/block/floor.png | Bin 5617 -> 7156 bytes assets/TextureBlock/block/floor.png.meta | 4 +- assets/career/script/CareerItem.ts | 12 +- assets/career/script/CareerList.ts | 87 +-- assets/career/script/CareerManager.ts | 73 ++- assets/custom/Json/level808.json | 4 +- assets/custom/Json/level883.json | 6 +- assets/custom/Json/level921.json | 620 ++++++++---------- assets/prefab/prop/floor.prefab | 2 +- assets/prefab/prop/moveFloor.prefab | 4 +- 17 files changed, 479 insertions(+), 483 deletions(-) diff --git a/assets/Script/Block.ts b/assets/Script/Block.ts index 002e162..f21814c 100644 --- a/assets/Script/Block.ts +++ b/assets/Script/Block.ts @@ -256,7 +256,7 @@ export default class Block extends cc.Component { else if (this.type == BlockType.三连粘合块) { } - }, 100); + }, 200); @@ -508,15 +508,6 @@ export default class Block extends cc.Component { } } } - if (this.block_Info.moveFloor && this.block_Info.moveFloorTime) { - { - if (this.adhesiveNode.length > 0) { - for (let i = 0; i < this.adhesiveNode.length; i++) { - this.adhesiveNode[i].opacity = 0; - } - } - } - } // let adhesive = cc.instantiate(MapConroler._instance.Block_Prop[this.type]); } @@ -876,6 +867,7 @@ export default class Block extends cc.Component { this.block_Info.node.getComponent("Block").moveStack = true; } + let touchPoint = event.getLocation(); let local = this.node.parent.convertToNodeSpaceAR(touchPoint); this.touchPointX = local.x; @@ -890,6 +882,11 @@ export default class Block extends cc.Component { } this.setVibrate("light", 1) if (this.hit) this.hit.active = true; + if (this.block_Info.floor) { + if (this.block_Info.floorMove == true) { + this.hit.active = false; + } + } return true; } else { @@ -1026,7 +1023,7 @@ export default class Block extends cc.Component { return; } for (let i = 0; i < this.node.children.length; i++) { - if (this.node.children[i].name == "floor") { + if (this.node.children[i].name == "floor" || this.node.children[i].name == "moveFloor") { this.node.children[i].getComponent("Floor").reduce(1); } } @@ -1182,7 +1179,7 @@ export default class Block extends cc.Component { setTimeout(() => { this.node.getChildByName("lock").getComponent("Lock").reduce(); for (let i = 0; i < this.node.children.length; i++) { - if (this.node.children[i].name == "floor") { + if (this.node.children[i].name == "floor" || this.node.children[i].name == "moveFloor") { this.node.children[i].getComponent("Floor").reduce(); } } @@ -1190,7 +1187,7 @@ export default class Block extends cc.Component { return; } for (let i = 0; i < this.node.children.length; i++) { - if (this.node.children[i].name == "floor") { + if (this.node.children[i].name == "floor" || this.node.children[i].name == "moveFloor") { this.node.children[i].getComponent("Floor").reduce(1); } } @@ -1403,7 +1400,7 @@ export default class Block extends cc.Component { this.block_Info.floorTime = null; for (let i = 0; i < this.node.children.length; i++) { - if (this.node.children[i].name == "floor") { + if (this.node.children[i].name == "floor" || this.node.children[i].name == "moveFloor") { this.node.children[i].active = false; } } @@ -2029,7 +2026,7 @@ export default class Block extends cc.Component { } } floor.parent = this.node; - floor.zIndex = 999; + floor.zIndex = 999 - i; let floorX = - 65 + 120 * this.allBlocks[i].x; let floorY = 60 + 120 * this.allBlocks[i].y; floor.setPosition(floorX, floorY); floor.getComponent("Floor").init(this.block_Info.floorTime); @@ -2041,7 +2038,7 @@ export default class Block extends cc.Component { } if (this.type == BlockType.叠加块上) { for (let j = 0; j < this.node.children.length; j++) { - if (this.node.children[j].name == "floor") { + if (this.node.children[j].name == "floor" || this.node.children[j].name == "moveFloor") { this.node.children[j].active = false; } } @@ -2065,7 +2062,7 @@ export default class Block extends cc.Component { } if (this.type == BlockType.叠加块上) { for (let j = 0; j < this.node.children.length; j++) { - if (this.node.children[j].name == "floor") { + if (this.node.children[j].name == "floor" || this.node.children[j].name == "moveFloor") { this.node.children[j].active = false; } } diff --git a/assets/Script/GameManager.ts b/assets/Script/GameManager.ts index e567660..6fb79e7 100644 --- a/assets/Script/GameManager.ts +++ b/assets/Script/GameManager.ts @@ -54,6 +54,7 @@ export default class GameManager extends cc.Component { // LIFE-CYCLE CALLBACKS: /** 游戏入口初始化 */ onLoad() { + window.initMgr(); this.timeNumber = 2; // cc.director.preloadScene("HomeScene", (err, asset) => { @@ -61,6 +62,9 @@ export default class GameManager extends cc.Component { this.startTimeCutDown(); cc.fx.GameConfig.init(true); cc.fx.GameConfig.GM_INFO.gameState = false; + setTimeout(() => { + cc.fx.GameTool.initWechatErrorTracking(); + }, 500); this.readMusicConfig(); this.load1 = this.load2 = this.load3 = this.load4 = this.load5 = this.load6 = false; diff --git a/assets/Script/JiaZai.ts b/assets/Script/JiaZai.ts index 8f6c11e..cce97da 100644 --- a/assets/Script/JiaZai.ts +++ b/assets/Script/JiaZai.ts @@ -78,6 +78,7 @@ export default class JiaZai extends cc.Component { @property(cc.Node) Stamina: cc.Node = null; scheduleCallback: any; + isShow: boolean = true; private heath: any; // 用于存储heath预制体 private lastPauseClickTime: number = 0; // 用于记录上次点击的时间戳 // 弹窗倒计时调度器 @@ -119,6 +120,8 @@ export default class JiaZai extends cc.Component { this.getShareInfo(); } initProvinceLocator(); + // this.RankNode = null; + this.isShow = true; this.node.getChildByName("Snow").active = false; this.node.getChildByName("Snow").zIndex = 999; console.log("最新版本___________"); @@ -129,7 +132,7 @@ export default class JiaZai extends cc.Component { this.closeAvatar(); this.setShareInfo(); this.checkTasks(); - this.getSRank(); + this.checkAndSetPlayerPassLevel(); // this.checkDailyQuests(); console.log("进入首页获取的share", cc.fx.GameConfig.GM_INFO.otherUid, cc.fx.GameConfig.GM_INFO.otherLevel); @@ -265,6 +268,7 @@ export default class JiaZai extends cc.Component { if (cc.fx.GameConfig.GM_INFO.otherLevel > 0) { + this.getSRank(false); if (cc.fx.GameConfig.GM_INFO.first) { this.setFirstMusic(); cc.fx.GameConfig.GM_INFO.first = false; @@ -279,11 +283,14 @@ export default class JiaZai extends cc.Component { } else { // this.closeLoad(); + this.isShow = false; cc.fx.GameConfig.LEVEL_INFO_init(true, 1000, true); } } else { if (cc.fx.GameConfig.GM_INFO.first) { + this.isShow = false; + this.getSRank(false); //console.log("————————准备注册事件", cc.fx.GameConfig.GM_INFO.openid); this.setFirstMusic(); cc.fx.AudioManager._instance.playEffect("zhuan1", null); @@ -294,6 +301,9 @@ export default class JiaZai extends cc.Component { cc.director.loadScene("GameScene"); }, 1000); } + else { + this.getSRank(true); + } } //console.log("音乐开关", cc.fx.GameConfig.GM_INFO.musicOpen); @@ -912,6 +922,7 @@ export default class JiaZai extends cc.Component { cc.fx.GameTool.requestSubscribe(); return; } + this.isShow = false; cc.fx.GameConfig.LEVEL_INFO_init(true, 0, false); } else { @@ -923,6 +934,7 @@ export default class JiaZai extends cc.Component { cc.fx.GameTool.requestSubscribe(); return; } + this.isShow = false; cc.fx.GameConfig.LEVEL_INFO_init(true, 1000, false); } } @@ -935,7 +947,7 @@ export default class JiaZai extends cc.Component { cc.fx.AudioManager._instance.playEffect("zhuan1", null); this.node.getChildByName("zhuanchang").active = true; this.node.getChildByName("zhuanchang").getComponent(sp.Skeleton).setAnimation(1, "up", false); - + this.isShow = false; cc.fx.GameConfig.LEVEL_INFO_init(true, 1000, false); } else { @@ -947,6 +959,7 @@ export default class JiaZai extends cc.Component { cc.fx.GameTool.requestSubscribe(); return; } + this.isShow = false; cc.fx.GameConfig.LEVEL_INFO_init(true, 0, false); } else { @@ -958,6 +971,7 @@ export default class JiaZai extends cc.Component { cc.fx.GameTool.requestSubscribe(); return; } + this.isShow = false; cc.fx.GameConfig.LEVEL_INFO_init(true, 1000, false); } } @@ -2475,12 +2489,12 @@ export default class JiaZai extends cc.Component { } //获取入职排行榜 - getSRank() { + getSRank(isShow: boolean = true) { console.log("_________________________重新获取排行"); if (this.RankNode == null && this.RankNode == undefined) { this.LoadCareer(() => { Utils.getSRank(res => { - + debugger; let data = JSON.parse(res.data); let role = data.role; let sortedArray = []; @@ -2572,11 +2586,11 @@ export default class JiaZai extends cc.Component { this.node.getChildByName("Snow").active = true; }) .start() - }) + }, true) } // console.log("rankingData_________", rankData); }); - }); + }, isShow); } } @@ -2664,13 +2678,13 @@ export default class JiaZai extends cc.Component { this.node.getChildByName("Snow").active = true; }) .start() - }) + }, true) } // console.log("rankData更新!!!!!!!!", this.careerRank.rankData); } - LoadCareer(callback: () => void) { + LoadCareer(callback: () => void, isShow: boolean = true) { cc.assetManager.loadBundle('career', (err: Error, bundle: cc.AssetManager.Bundle) => { if (err) { cc.error(err.message || err); @@ -2683,8 +2697,11 @@ export default class JiaZai extends cc.Component { return; } this.RankNode = cc.instantiate(prefab); - if (callback) - callback(); + if (isShow = true && this.isShow == true) { + if (callback) + callback(); + } + }); }); } diff --git a/assets/Script/Map.ts b/assets/Script/Map.ts index 9a64a89..c00be10 100644 --- a/assets/Script/Map.ts +++ b/assets/Script/Map.ts @@ -670,8 +670,11 @@ export default class MapConroler extends cc.Component { position: blockInfo.position, stacking: blockInfo.color }; - if (blockInfo.floor) info["floor"] = blockInfo.floor; - if (blockInfo.floorTime) info["floorTime"] = blockInfo.floorTime; + if (blockInfo.floor) { + info["floor"] = blockInfo.floor; + if (blockInfo.floorTime) info["floorTime"] = blockInfo.floorTime; + } + // 缓存 Block_Array 访问 const blockUpPrefab = this.Block_Array[info.block]; @@ -2038,7 +2041,7 @@ export default class MapConroler extends cc.Component { for (let i = 0; i < floorBlock.length; i++) { for (let j = 0; j < floorBlock[i].children.length; j++) { - if (floorBlock[i].children[j].name == "floor") { + if (floorBlock[i].children[j].name == "floor" || floorBlock[i].children[j].name == "moveFloor") { floorBlock[i].children[j].getComponent("Floor").reduce(1); } } diff --git a/assets/Script/lq_collide_system/lq_collide.ts b/assets/Script/lq_collide_system/lq_collide.ts index b073513..2d5578b 100644 --- a/assets/Script/lq_collide_system/lq_collide.ts +++ b/assets/Script/lq_collide_system/lq_collide.ts @@ -298,12 +298,12 @@ export class LQCollide extends Component { case LQCollideShape.Rect: // 矩形碰撞区域尺寸更新 // console.log(this.data_string); - if (this._size.width !== 10 && this.data_string != "-1") { + if (this._size.width !== 10 && this.data_string != "-1" && this.data_string != "-2") { // if(this._size.width == 105 || this._size.height == 105){} this._size.width = this._size.width * scaleX; // console.log("放大倍数",scaleX); } - if (this._size.height !== 10 && this.data_string != "-1") { + if (this._size.height !== 10 && this.data_string != "-1" && this.data_string != "-2") { // if(this._size.width == 105 || this._size.height == 105){} this._size.height = this._size.height * scaleY; // console.log("放大倍数",scaleY); @@ -366,10 +366,10 @@ export class LQCollide extends Component { if (collide.node.name == "rise" && block.type == 9) { let otherColor = collide.node.parent.getChildByName("risefall").getChildByName("color").getComponent(cc.Label).string; - if (block.color == otherColor && this.data_string != "-1") { + if (block.color == otherColor && this.data_string != "-1" && this.data_string != "-2") { return; } - if (block.block_Info.node.getComponent("Block").color == otherColor && this.data_string == "-1") { + if (block.block_Info.node.getComponent("Block").color == otherColor && this.data_string != "-1" && this.data_string != "-2") { return; } // if (this.is_music == false) { @@ -432,10 +432,10 @@ export class LQCollide extends Component { if (block.isTouch) { if (collide.node.name == "rise" && block.type == 9) { let otherColor = collide.node.parent.getChildByName("risefall").getChildByName("color").getComponent(cc.Label).string; - if (block.color == otherColor && this.data_string != "-1") { + if (block.color == otherColor && this.data_string != "-1" && this.data_string != "-2") { return; } - if (block.block_Info.node.getComponent("Block").color == otherColor && this.data_string == "-1") { + if (block.block_Info.node.getComponent("Block").color == otherColor && this.data_string != "-1" && this.data_string != "-2") { return; } } diff --git a/assets/Script/module/Config/GameConfig.ts b/assets/Script/module/Config/GameConfig.ts index 11f5173..296a70c 100644 --- a/assets/Script/module/Config/GameConfig.ts +++ b/assets/Script/module/Config/GameConfig.ts @@ -66,6 +66,7 @@ export class GameConfig { static CITY: { 河北省: boolean; 山西省: boolean; 辽宁省: boolean; 吉林省: boolean; 黑龙江省: boolean; 江苏省: boolean; 浙江省: boolean; 安徽省: boolean; 福建省: boolean; 江西省: boolean; 山东省: boolean; 河南省: boolean; 湖北省: boolean; 湖南省: boolean; 广东省: boolean; 海南省: boolean; 四川省: boolean; 贵州省: boolean; 云南省: boolean; 陕西省: boolean; 甘肃省: boolean; 青海省: boolean; 港澳台: boolean; 北京: boolean; 天津: boolean; 上海: boolean; 重庆: boolean; 内蒙古: boolean; 广西: boolean; 西藏: boolean; 宁夏: boolean; 新疆: boolean; }; static GM_INFO: { // isEnd: false, + error_message: any[]; // 错误信息 mean_Time: number; //平均放箭速度 hp: number; //体力值 review: number; //复活次数 @@ -155,6 +156,7 @@ export class GameConfig { + //游戏内信息 static get Instance() { @@ -245,6 +247,7 @@ export class GameConfig { static GM_INFO_init() { this.GM_INFO = { // isEnd: false, + error_message: [], // 错误信息 mean_Time: 0, //平均放箭速度 hp: 5, //体力值 review: 0, //复活次数 diff --git a/assets/Script/module/Tool/GameTool.ts b/assets/Script/module/Tool/GameTool.ts index 5c19c75..5308d0a 100644 --- a/assets/Script/module/Tool/GameTool.ts +++ b/assets/Script/module/Tool/GameTool.ts @@ -2025,6 +2025,60 @@ var GameTool = { const scaleAction = cc.scaleTo(duration, scale).easing(cc.easeBackOut()); const reverseAction = cc.scaleTo(duration, 1).easing(cc.easeBackIn()); node.runAction(cc.sequence(scaleAction, reverseAction)); + }, + + + // ==================== 错误跟踪功能 ==================== + + initWechatErrorTracking() { + if (cc.sys.platform === cc.sys.WECHAT_GAME) { + // 使用 wx.onError 捕获微信特定的错误 + //@ts-ignore + wx.onError((error) => { + console.log("_____________________wx.onError 捕获到错误", error); + this.trackErrorToShushu(error) + }); + + console.log('微信 onError 错误监听已初始化'); + } + }, + + // 获取错误堆栈信息 + getErrorStack(error: any): string { + if (error.stack) { + return error.stack; + } + if (error.message) { + return error.message; + } + if (error.toString) { + return error.toString(); + } + return JSON.stringify(error); + }, + + trackErrorToShushu(error: any) { + console.log("_____________________上报错误"); + if (!cc.fx.GameConfig.GM_INFO.error_message.includes(error.message)) { + cc.fx.GameConfig.GM_INFO.error_message.push(error.message); + } + else { + console.log("_____________________上报结束,关闭重复"); + //@ts-ignore + wx.offError(); + } + let errorData = { + error_type: "javascript", + error_message: error.message || String(error), + error_stack: error.stack || '', + game_version: cc.fx.GameConfig.GM_INFO?.version || 'unknown', + user_id: cc.fx.GameConfig.GM_INFO?.userId || 'unknown', + level: cc.fx.GameConfig.GM_INFO?.level || 0, + timestamp: Date.now(), + coin: cc.fx.GameConfig.GM_INFO?.coin || 0 + }; + MiniGameSdk.API.shushu_Track('error', errorData); } + }; export { GameTool }; \ No newline at end of file diff --git a/assets/TextureBlock/block/floor.png b/assets/TextureBlock/block/floor.png index d0cbb61ecbd71d63e3c72bcf83894dc53671ab31..577c74694b602cde659ce98897e20702b9a7979f 100644 GIT binary patch literal 7156 zcmV)b5y_5Iw|qyl za5}JVIgwT~lW0Dqb3;xn7k5J>QZ5)`J0T|)3xrK7!Gubxct>(TAvhlpqG&$9g-p+t zUB!q|y?#cxbw06uNi7-m|f79T*Qe_#*0zBct4g~Hk)8Jl2P~T{OdpPLWqL&y`w}SuxI*Ta{We)0S zv~W7RcRr6*E|gg|l2mb34tJTeWdIyLLXfbUfFe zW3+KP)}CUHR55WsA-#f1$BR+CcRr0&F|%+vv~W3|VmQ8oOW2@fm0C6c00790QoVRT znUdj{000=DNkl5A-t?%^lvR_pB^sl~7R_3Ajbapu zU1LWSR76E-QUpO|=qMefNFUmO6lpUQabS=sOmSwI$uM`=|2c0jkmr8d4||e4Vb1%` z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ets/TextureBlock/block/floor.png.meta index 5c68586..03daeb3 100644 --- a/assets/TextureBlock/block/floor.png.meta +++ b/assets/TextureBlock/block/floor.png.meta @@ -25,9 +25,9 @@ "trimX": 0, "trimY": 0, "width": 120, - "height": 120, + "height": 132, "rawWidth": 120, - "rawHeight": 120, + "rawHeight": 132, "borderTop": 0, "borderBottom": 0, "borderLeft": 0, diff --git a/assets/career/script/CareerItem.ts b/assets/career/script/CareerItem.ts index e7bb58c..3aa9b56 100644 --- a/assets/career/script/CareerItem.ts +++ b/assets/career/script/CareerItem.ts @@ -60,15 +60,21 @@ export default class CareerItem extends cc.Component { this.node.getChildByName("ranking").getChildByName("nomal").active = true; NumberToImage.numberToImageNodes4(this.data.rank, 43, 15, "company_", this.node.getChildByName("ranking").getChildByName("nomal").getChildByName("rank"), true); let rank = this.node.getChildByName("ranking").getChildByName("nomal").getChildByName("rank"); - for (let i = 0; i < rank.children.length; i++) { - rank.children[i].color = cc.Color.WHITE; + if (rank.children.length > 0) { + for (let i = 0; i < rank.children.length; i++) { + rank.children[i].color = cc.Color.WHITE; + } } } this.node.zIndex = this.data.rank; if (this.randerChildren.length == 0) { this.randerChildren = []; - let length = this.data.rankingData.length + 4; + let lengthTemp = 0; + if (this.data.rankingData.length) { + lengthTemp = this.data.rankingData.length; + } + let length = lengthTemp + 4; if (length > 12) length = 12; for (let i = 4; i < length; i++) { this.randerChildren.push(this.node.children[i]); diff --git a/assets/career/script/CareerList.ts b/assets/career/script/CareerList.ts index b2af570..37abe78 100644 --- a/assets/career/script/CareerList.ts +++ b/assets/career/script/CareerList.ts @@ -291,12 +291,14 @@ export default class CareerList extends cc.Component { if (viewPos) { //item上滑时,超出了scrollView上边界,将item移动到下方复用,item移动到下方的位置必须不超过content的下边界 if (viewPos.y > bufferZone && item.y - offset - this.padding_buttom > -this.content.height - firstRenderOffsetY) { - let itemRender: CareerItem = item.getComponent(CareerItem); - let itemIndex = itemRender.itemIndex + items.length; - itemRender.itemIndex = itemIndex; - itemRender.data = this.itemDataList[itemIndex]; - itemRender.dataChanged(); - item.y = item.y - offset; + if (item.getComponent(CareerItem)) { + let itemRender: CareerItem = item.getComponent(CareerItem); + let itemIndex = itemRender.itemIndex + items.length; + itemRender.itemIndex = itemIndex; + itemRender.data = this.itemDataList[itemIndex]; + itemRender.dataChanged(); + item.y = item.y - offset; + } } } @@ -304,12 +306,14 @@ export default class CareerList extends cc.Component { if (viewPos) { //item下滑时,超出了scrollView下边界,将item移动到上方复用,item移动到上方的位置必须不超过content的上边界 if (viewPos.y < -bufferZone && item.y + offset + this.padding_top < -firstRenderOffsetY) { - let itemRender: CareerItem = item.getComponent(CareerItem); - let itemIndex = itemRender.itemIndex - items.length; - itemRender.itemIndex = itemIndex; - itemRender.data = this.itemDataList[itemIndex]; - itemRender.dataChanged(); - item.y = item.y + offset; + if (item.getComponent(CareerItem)) { + let itemRender: CareerItem = item.getComponent(CareerItem); + let itemIndex = itemRender.itemIndex - items.length; + itemRender.itemIndex = itemIndex; + itemRender.data = this.itemDataList[itemIndex]; + itemRender.dataChanged(); + item.y = item.y + offset; + } } } } @@ -434,39 +438,42 @@ export default class CareerList extends cc.Component { public firstRenderInit() { // let this.firstRender.active = true; - if (this.randerChildren.length == 0) { - this.randerChildren = []; - let length = this.topData.length + 3; - if (length > this.firstRender.children.length) - length = this.firstRender.children.length; - for (let i = 3; i < length; i++) { - this.randerChildren.push(this.firstRender.children[i]); - let username = cc.fx.GameTool.subName(this.topData[i - 3].username, 5); - if (username == "user") username = "匿名玩家"; - this.firstRender.children[i].getChildByName("name").getComponent(cc.Label).string = username + ""; - this.firstRender.children[i].getChildByName("rank").getComponent(cc.Label).string = this.topData[i - 3].addLevel; - if (this.topData[i - 3].useravatar == "" || this.topData[i - 3].useravatar == null || this.topData[i - 3].useravatar == undefined - ) { - // this.firstRender.children[i].getChildByName("icon").getComponent(cc.Sprite).spriteFrame = this.defaultsprite; - } - else if (this.topData[i - 3].useravatar == "0" || this.topData[i - 3].useravatar == "1" || this.topData[i - 3].useravatar == "2" - || this.topData[i - 3].useravatar == "3" || this.topData[i - 3].useravatar == "4" || this.topData[i - 3].useravatar == "5" || this.topData[i - 3].useravatar == "6" - || this.topData[i - 3].useravatar == "7" || this.topData[i - 3].useravatar == "8" || this.topData[i - 3].useravatar == "9" || - this.topData[i - 3].useravatar == "10" || this.topData[i - 3].useravatar == "11" || this.topData[i - 3].useravatar == "12" || this.topData[i - 3].useravatar == "13" || this.topData[i - 3].useravatar == "14" - || this.topData[i - 3].useravatar == "15" || this.topData[i - 3].useravatar == "16" || this.topData[i - 3].useravatar == "17" - ) { + if (this.randerChildren) { + if (this.randerChildren.length == 0) { + this.randerChildren = []; + let length = this.topData.length + 3; + if (length > this.firstRender.children.length) + length = this.firstRender.children.length; + for (let i = 3; i < length; i++) { + this.randerChildren.push(this.firstRender.children[i]); + let username = cc.fx.GameTool.subName(this.topData[i - 3].username, 5); + if (username == "user") username = "匿名玩家"; + this.firstRender.children[i].getChildByName("name").getComponent(cc.Label).string = username + ""; + this.firstRender.children[i].getChildByName("rank").getComponent(cc.Label).string = this.topData[i - 3].addLevel; + if (this.topData[i - 3].useravatar == "" || this.topData[i - 3].useravatar == null || this.topData[i - 3].useravatar == undefined + ) { + // this.firstRender.children[i].getChildByName("icon").getComponent(cc.Sprite).spriteFrame = this.defaultsprite; + } + else if (this.topData[i - 3].useravatar == "0" || this.topData[i - 3].useravatar == "1" || this.topData[i - 3].useravatar == "2" + || this.topData[i - 3].useravatar == "3" || this.topData[i - 3].useravatar == "4" || this.topData[i - 3].useravatar == "5" || this.topData[i - 3].useravatar == "6" + || this.topData[i - 3].useravatar == "7" || this.topData[i - 3].useravatar == "8" || this.topData[i - 3].useravatar == "9" || + this.topData[i - 3].useravatar == "10" || this.topData[i - 3].useravatar == "11" || this.topData[i - 3].useravatar == "12" || this.topData[i - 3].useravatar == "13" || this.topData[i - 3].useravatar == "14" + || this.topData[i - 3].useravatar == "15" || this.topData[i - 3].useravatar == "16" || this.topData[i - 3].useravatar == "17" + ) { - let useravatar = this.topData[i - 3].useravatar; - let useravatarTemp = "icon_" + useravatar; - // console.log("222头像名称", useravatarTemp, "333用户名字:", username); - this.firstRender.children[i].getChildByName("mask").getChildByName("icon").getComponent(cc.Sprite).spriteFrame = this.UI.getSpriteFrame(useravatarTemp); - this.firstRender.children[i].getChildByName("mask").getChildByName("icon").width = 150; - this.firstRender.children[i].getChildByName("mask").getChildByName("icon").height = 150; + let useravatar = this.topData[i - 3].useravatar; + let useravatarTemp = "icon_" + useravatar; + // console.log("222头像名称", useravatarTemp, "333用户名字:", username); + this.firstRender.children[i].getChildByName("mask").getChildByName("icon").getComponent(cc.Sprite).spriteFrame = this.UI.getSpriteFrame(useravatarTemp); + this.firstRender.children[i].getChildByName("mask").getChildByName("icon").width = 150; + this.firstRender.children[i].getChildByName("mask").getChildByName("icon").height = 150; + } + else this.setPic(this.topData[i - 3].useravatar, this.firstRender.children[i].getChildByName("mask").getChildByName("icon")); } - else this.setPic(this.topData[i - 3].useravatar, this.firstRender.children[i].getChildByName("mask").getChildByName("icon")); } } + } public setPic(url, node) { diff --git a/assets/career/script/CareerManager.ts b/assets/career/script/CareerManager.ts index 57bf0d1..bba7aeb 100644 --- a/assets/career/script/CareerManager.ts +++ b/assets/career/script/CareerManager.ts @@ -41,13 +41,13 @@ export default class CareerManager extends cc.Component { } //实际设置排行数据 - public getRankData(data) { - if (data) { - // console.log(data); - cc.fx.GameTool.getRankData(data, this, 6); - this.setPic(this.selfData.pic); - } - } + // public getRankData(data) { + // if (data) { + // // console.log(data); + // cc.fx.GameTool.getRankData(data, this, 6); + // this.setPic(this.selfData.pic); + // } + // } //返回按钮 public backClick() { cc.director.loadScene("LoadScene"); @@ -55,40 +55,43 @@ export default class CareerManager extends cc.Component { //最上方用户动画 //设置头像 处理的逻辑比较多,不用公共类的了 - public setPic(pic) { - this.phone.node.parent.getChildByName("icon").active = false; - this.phone.node.active = false; - fetch(pic) - .then(response => { - return response.headers.get('Content-Length'); - }) - .then(errNo => { - if (errNo == "5093") { - this.phone.node.parent.getChildByName("icon").active = true; - } - }) - .catch(error => { - // console.error('Error fetching X-Info:', error); - }); - var self = this; - cc.assetManager.loadRemote(pic, { ext: '.png' }, (err, texture: cc.Texture2D) => { - if (texture) { - self.phone.node.active = true; - self.phone.spriteFrame = new cc.SpriteFrame(texture); - } - else { - } + // public setPic(pic) { + // this.phone.node.parent.getChildByName("icon").active = false; + // this.phone.node.active = false; + // fetch(pic) + // .then(response => { + // return response.headers.get('Content-Length'); + // }) + // .then(errNo => { + // if (errNo == "5093") { + // this.phone.node.parent.getChildByName("icon").active = true; + // } + // }) + // .catch(error => { + // // console.error('Error fetching X-Info:', error); + // }); + // var self = this; + // cc.assetManager.loadRemote(pic, { ext: '.png' }, (err, texture: cc.Texture2D) => { + // if (texture) { + // self.phone.node.active = true; + // self.phone.spriteFrame = new cc.SpriteFrame(texture); + // } + // else { + // } - }) - } + // }) + // } public setData(data, topData) { this.selfData = data; this.rankList.setData(this.listData, topData); - if (data.length > 0) { - this.rankNumber = data[0].rank; - this.rankTotal = data.length; + if (data) { + if (data.length > 0) { + this.rankNumber = data[0].rank; + this.rankTotal = data.length; + } } + } } diff --git a/assets/custom/Json/level808.json b/assets/custom/Json/level808.json index 8b02bed..8bf819a 100644 --- a/assets/custom/Json/level808.json +++ b/assets/custom/Json/level808.json @@ -377,9 +377,7 @@ "color": 6, "special": 3, "length": 1, - "freeze": 11, - "longAndShort": 12, - "order": true + "freeze": 11 } ] ] diff --git a/assets/custom/Json/level883.json b/assets/custom/Json/level883.json index 7a68765..f5bc786 100644 --- a/assets/custom/Json/level883.json +++ b/assets/custom/Json/level883.json @@ -305,13 +305,12 @@ { "block": 2, "color": 8, - "type": 17, + "type": 0, "position": { "x": 240, "y": -60, "z": 0 }, - "boomTime": 1, "floor": 2, "floorTime": 9, "floorMove": false, @@ -320,13 +319,12 @@ { "block": 1, "color": 7, - "type": 17, + "type": 0, "position": { "x": 240, "y": -180, "z": 0 }, - "boomTime": 1, "floor": 2, "floorTime": 9, "floorMove": false, diff --git a/assets/custom/Json/level921.json b/assets/custom/Json/level921.json index ffb8d07..725ad9f 100644 --- a/assets/custom/Json/level921.json +++ b/assets/custom/Json/level921.json @@ -2,532 +2,438 @@ "LEVEL_INFO": [ { "risefall": [], - "id": "886", + "id": "466", "map": [ - 10, - 12 + 9, + 10 ], - "time": 140, - "gap": [ - { - "x": 8, - "y": 10, - "z": 0 - }, - { - "x": 7, - "y": 10, - "z": 0 - }, - { - "x": 6, - "y": 10, - "z": 0 - }, - { - "x": 6, - "y": 9, - "z": 0 - }, - { - "x": 7, - "y": 9, - "z": 0 - }, - { - "x": 8, - "y": 9, - "z": 0 - }, - { - "x": 8, - "y": 8, - "z": 0 - }, - { - "x": 7, - "y": 8, - "z": 0 - }, - { - "x": 6, - "y": 8, - "z": 0 - }, - { - "x": 1, - "y": 8, - "z": 0 - }, - { - "x": 2, - "y": 8, - "z": 0 - }, - { - "x": 2, - "y": 7, - "z": 0 - }, - { - "x": 1, - "y": 7, - "z": 0 - }, - { - "x": 1, - "y": 6, - "z": 0 - }, - { - "x": 1, - "y": 5, - "z": 0 - }, - { - "x": 1, - "y": 4, - "z": 0 - }, - { - "x": 1, - "y": 3, - "z": 0 - }, - { - "x": 2, - "y": 3, - "z": 0 - }, - { - "x": 2, - "y": 4, - "z": 0 - }, - { - "x": 2, - "y": 5, - "z": 0 - }, - { - "x": 2, - "y": 6, - "z": 0 - }, - { - "x": 6, - "y": 1, - "z": 0 - }, - { - "x": 5, - "y": 1, - "z": 0 - }, - { - "x": 5, - "y": 2, - "z": 0 - }, - { - "x": 6, - "y": 2, - "z": 0 - }, - { - "x": 6, - "y": 3, - "z": 0 - }, - { - "x": 5, - "y": 3, - "z": 0 - } - ] + "time": 150, + "gap": [] } ], "BLOCK_INFO": [ [ { - "block": 5, - "color": 9, - "type": 0, + "block": 2, + "color": 5, + "type": 8, "position": { - "x": 0, - "y": -600, - "z": 0 - }, - "id": 210 - }, - { - "block": 4, - "color": 9, - "type": 0, - "position": { - "x": 120, + "x": -180, "y": 240, "z": 0 }, + "floor": 1, + "floorTime": 5, + "id": 210 + }, + { + "block": 2, + "color": 6, + "type": 4, + "position": { + "x": -300, + "y": 240, + "z": 0 + }, + "freezeTime": 12, + "floor": 1, + "floorTime": 5, "id": 220 }, { - "block": 6, - "color": 2, + "block": 3, + "color": 1, "type": 0, "position": { - "x": -120, + "x": 180, "y": 120, "z": 0 }, + "floor": 2, + "floorTime": 10, + "floorMove": true, "id": 230 }, { - "block": 2, + "block": 1, "color": 2, "type": 0, "position": { - "x": 0, + "x": 60, "y": 0, "z": 0 }, + "floor": 2, + "floorTime": 10, + "floorMove": true, "id": 240 }, { - "block": 1, - "color": 7, + "block": 0, + "color": 3, "type": 0, "position": { - "x": 480, - "y": -360, + "x": 180, + "y": 0, "z": 0 }, + "floor": 2, + "floorTime": 10, + "floorMove": true, "id": 250 }, { - "block": 2, - "color": 7, - "type": 0, + "block": 5, + "color": 8, + "type": 8, "position": { - "x": -360, - "y": -600, + "x": 420, + "y": -240, "z": 0 }, + "floor": 3, + "floorTime": 15, "id": 260 }, { "block": 0, - "color": 7, + "color": 5, "type": 0, "position": { - "x": 120, - "y": -120, + "x": -60, + "y": 360, "z": 0 }, "id": 270 }, { - "block": 2, - "color": 10, + "block": 0, + "color": 5, "type": 0, "position": { - "x": 360, - "y": -240, + "x": 420, + "y": 0, "z": 0 }, "id": 280 }, { - "block": 2, - "color": 10, + "block": 1, + "color": 5, "type": 0, "position": { - "x": 0, - "y": -360, + "x": -180, + "y": 120, "z": 0 }, "id": 290 }, { - "block": 1, - "color": 4, + "block": 3, + "color": 3, "type": 0, "position": { - "x": 240, - "y": 0, + "x": 300, + "y": 360, "z": 0 }, "id": 300 }, { - "block": 2, - "color": 5, + "block": 0, + "color": 2, "type": 0, "position": { - "x": 0, - "y": 360, + "x": -60, + "y": 240, "z": 0 }, "id": 310 }, { - "block": 0, - "color": 6, + "block": 2, + "color": 10, "type": 0, "position": { - "x": -240, - "y": 480, + "x": -300, + "y": -480, "z": 0 }, "id": 320 }, { "block": 2, - "color": 3, + "color": 10, "type": 0, "position": { - "x": -120, - "y": -240, + "x": -60, + "y": -360, "z": 0 }, "id": 330 }, { - "block": 0, - "color": 1, + "block": 2, + "color": 2, "type": 0, "position": { - "x": -240, + "x": 60, "y": -480, "z": 0 }, "id": 340 }, { - "block": 1, - "color": 8, + "block": 0, + "color": 9, "type": 0, "position": { - "x": 480, - "y": -600, + "x": 180, + "y": -480, "z": 0 }, "id": 350 }, { "block": 2, - "color": 5, - "type": 0, + "color": 2, + "type": 9, "position": { - "x": 480, + "x": -300, "y": -240, "z": 0 }, + "adhesiveTime": 2, "id": 360 }, { - "block": 1, - "color": 10, - "type": 0, + "block": 0, + "color": 6, + "type": 9, "position": { - "x": 240, - "y": -240, + "x": -180, + "y": -120, "z": 0 }, - "floor": 1, - "floorTime": 11, - "floorMove": true, + "adhesiveTime": 1, "id": 370 }, { - "block": 2, - "color": 5, - "type": 16, + "block": 1, + "color": 6, + "type": 9, "position": { - "x": 480, - "y": 0, + "x": 180, + "y": -120, "z": 0 }, - "questionTime": 6, - "floor": 2, - "floorTime": 7, - "floorMove": true, + "adhesiveTime": 2, "id": 380 }, { - "block": 3, + "block": 0, + "color": 8, + "type": 9, + "position": { + "x": 180, + "y": -240, + "z": 0 + }, + "adhesiveTime": 1, + "id": 390 + }, + { + "block": 1, + "color": 9, + "type": 9, + "position": { + "x": 420, + "y": -360, + "z": 0 + }, + "adhesiveTime": 2, + "id": 400 + }, + { + "block": 0, + "color": 7, + "type": 9, + "position": { + "x": 420, + "y": -480, + "z": 0 + }, + "adhesiveTime": 1, + "id": 410 + }, + { + "block": 2, "color": 8, "type": 0, "position": { - "x": 360, - "y": 120, + "x": 300, + "y": 0, "z": 0 }, - "freezeTime": 8, - "floor": 2, - "floorTime": 7, - "floorMove": true, - "id": 390 + "id": 420 + }, + { + "block": 2, + "color": 6, + "type": 0, + "position": { + "x": 420, + "y": 240, + "z": 0 + }, + "id": 430 + }, + { + "block": 1, + "color": 9, + "type": 4, + "position": { + "x": -60, + "y": -480, + "z": 0 + }, + "freezeTime": 9, + "id": 440 } ] ], "WALL_INFO": [ [ { - "id": 887, - "num": 0, - "color": 5, + "id": 467, + "num": 2, + "color": 7, "special": 0, "length": 2 }, { - "id": 888, - "num": 1, - "color": 5, + "id": 468, + "num": 3, + "color": 7, "special": 0, "length": 0 }, { - "id": 889, - "num": 2, - "color": 10, + "id": 469, + "num": 5, + "color": 9, "special": 0, - "length": 2, - "longAndShort": 12, - "order": false + "length": 1 }, { - "id": 890, - "num": 3, - "color": 10, - "special": 0, - "length": 0, - "longAndShort": 12, - "order": false - }, - { - "id": 891, - "num": 33, - "color": 7, - "special": 0, - "length": 2, - "longAndShort": 12, - "order": true - }, - { - "id": 892, - "num": 34, - "color": 7, - "special": 0, - "length": 0, - "longAndShort": 12, - "order": true - }, - { - "id": 893, - "num": 42, - "color": 2, - "special": 0, - "length": 3, - "longAndShort": 13, - "order": true - }, - { - "id": 894, - "num": 43, - "color": 2, - "special": 0, - "length": 0, - "longAndShort": 13, - "order": true - }, - { - "id": 895, - "num": 44, - "color": 2, - "special": 0, - "length": 0, - "longAndShort": 13, - "order": true - }, - { - "id": 896, - "num": 39, - "color": 3, - "special": 0, - "length": 2, - "longAndShort": 12, - "order": true - }, - { - "id": 897, - "num": 40, - "color": 3, - "special": 0, - "length": 0, - "longAndShort": 12, - "order": true - }, - { - "id": 898, - "num": 7, - "color": 8, + "id": 470, + "num": 13, + "color": 1, "special": 0, "length": 3 }, { - "id": 899, - "num": 17, - "color": 8, - "special": 0, - "length": 0 - }, - { - "id": 900, - "num": 19, - "color": 8, - "special": 0, - "length": 0 - }, - { - "id": 901, - "num": 26, + "id": 471, + "num": 15, "color": 1, "special": 0, - "length": 1 + "length": 0 }, { - "id": 902, - "num": 41, - "color": 6, - "special": 0, - "length": 1 - }, - { - "id": 903, - "num": 35, - "color": 9, - "special": 0, - "length": 2 - }, - { - "id": 904, - "num": 37, - "color": 9, + "id": 472, + "num": 17, + "color": 1, "special": 0, "length": 0 }, { - "id": 905, - "num": 18, - "color": 4, + "id": 473, + "num": 28, + "color": 10, "special": 0, "length": 2 }, { - "id": 906, + "id": 474, + "num": 29, + "color": 10, + "special": 0, + "length": 0 + }, + { + "id": 475, + "num": 25, + "color": 2, + "special": 0, + "length": 2 + }, + { + "id": 476, + "num": 26, + "color": 2, + "special": 0, + "length": 0 + }, + { + "id": 477, + "num": 22, + "color": 6, + "special": 0, + "length": 2 + }, + { + "id": 478, + "num": 23, + "color": 6, + "special": 0, + "length": 0 + }, + { + "id": 479, + "num": 18, + "color": 8, + "special": 0, + "length": 2 + }, + { + "id": 480, "num": 20, - "color": 4, + "color": 8, + "special": 0, + "length": 0 + }, + { + "id": 481, + "num": 12, + "color": 3, + "special": 0, + "length": 3 + }, + { + "id": 482, + "num": 14, + "color": 3, + "special": 0, + "length": 0 + }, + { + "id": 483, + "num": 16, + "color": 3, + "special": 0, + "length": 0 + }, + { + "id": 484, + "num": 8, + "color": 5, + "special": 0, + "length": 2 + }, + { + "id": 485, + "num": 10, + "color": 5, "special": 0, "length": 0 } diff --git a/assets/prefab/prop/floor.prefab b/assets/prefab/prop/floor.prefab index ceb0245..83de7fe 100644 --- a/assets/prefab/prop/floor.prefab +++ b/assets/prefab/prop/floor.prefab @@ -50,7 +50,7 @@ "_contentSize": { "__type__": "cc.Size", "width": 120, - "height": 120 + "height": 132 }, "_anchorPoint": { "__type__": "cc.Vec2", diff --git a/assets/prefab/prop/moveFloor.prefab b/assets/prefab/prop/moveFloor.prefab index 0938372..636bac8 100644 --- a/assets/prefab/prop/moveFloor.prefab +++ b/assets/prefab/prop/moveFloor.prefab @@ -13,7 +13,7 @@ }, { "__type__": "cc.Node", - "_name": "floor", + "_name": "moveFloor", "_objFlags": 0, "_parent": null, "_children": [ @@ -50,7 +50,7 @@ "_contentSize": { "__type__": "cc.Size", "width": 120, - "height": 120 + "height": 132 }, "_anchorPoint": { "__type__": "cc.Vec2",