diff --git a/assets/Scene/GameScene.fire b/assets/Scene/GameScene.fire index 2dcbf77..09f8b3d 100644 --- a/assets/Scene/GameScene.fire +++ b/assets/Scene/GameScene.fire @@ -4729,6 +4729,9 @@ "wallRevolvingPrefab": { "__uuid__": "a7045129-1b59-44d6-99a0-6316107b3b7b" }, + "CityName": { + "__uuid__": "933f7976-6238-4e66-bef6-a7e118893b12" + }, "timeBtn": { "__id__": 77 }, @@ -17082,7 +17085,7 @@ "ctor": "Float64Array", "array": [ 0, - -546.13, + -544.13, 0, 0, 0, @@ -17235,8 +17238,8 @@ "__type__": "TypedArray", "ctor": "Float64Array", "array": [ - -79.685, - -5.099, + -65, + -9.823, 0, 0, 0, @@ -17268,7 +17271,7 @@ "__id__": 348 }, "_children": [], - "_active": true, + "_active": false, "_components": [ { "__id__": 353 @@ -17368,7 +17371,7 @@ "__id__": 355 } ], - "_active": true, + "_active": false, "_components": [], "_prefab": null, "_opacity": 255, @@ -17552,7 +17555,7 @@ "ctor": "Float64Array", "array": [ 303.654, - 24.556, + -8.444, 0, 0, 0, @@ -21045,7 +21048,7 @@ "__id__": 426 }, "_children": [], - "_active": true, + "_active": false, "_components": [ { "__id__": 431 @@ -21182,10 +21185,10 @@ 0, 0, 0, - -0.043619387365336, - 0.9990482215818578, - 1, - 1, + 0.04361938736533583, + -0.9990482215818578, + 0.01, + 0.01, 1 ] }, @@ -21193,7 +21196,7 @@ "__type__": "cc.Vec3", "x": 0, "y": 0, - "z": -5 + "z": -365 }, "_skewX": 0, "_skewY": 0, @@ -21560,8 +21563,8 @@ 0, 0, 1, - 1, - 1, + 0.01, + 0.01, 1 ] }, @@ -21656,8 +21659,8 @@ 0, 1, 6.123233995736766e-17, - 1, - 1, + 0.01, + 0.01, 1 ] }, @@ -21716,7 +21719,7 @@ "__id__": 426 }, "_children": [], - "_active": true, + "_active": false, "_components": [ { "__id__": 445 @@ -21752,8 +21755,8 @@ 0, 0.043619387365336, 0.9990482215818578, - 1, - 1, + 5, + 5, 1 ] }, diff --git a/assets/Script/JiaZai.ts b/assets/Script/JiaZai.ts index 025250c..857bdd3 100644 --- a/assets/Script/JiaZai.ts +++ b/assets/Script/JiaZai.ts @@ -2494,6 +2494,7 @@ export default class JiaZai extends cc.Component { .start() }) } + // console.log("rankingData_________", rankData); }); } @@ -2523,14 +2524,23 @@ export default class JiaZai extends cc.Component { }) if (rankingData.length >= 8) { - for (let i = 0; i < rankingData.length; i++) { - if (rankingData[i].addLevel < selfData.addLevel) { - rankingData.splice(i, 0, selfData); - self = true - break; + let jg = false; + for (let j = 0; j < 8; j++) { + if (rankingData[j].id == cc.fx.GameConfig.GM_INFO.uid) { + jg = true; + return; } } - if (!self) rankingData[7] = selfData + if (!jg) { + for (let i = 0; i < rankingData.length; i++) { + if (rankingData[i].addLevel < selfData.addLevel) { + rankingData.splice(i, 0, selfData); + self = true + break; + } + } + if (!self) rankingData[7] = selfData + } } else { // rankingData.push(selfData) @@ -2542,6 +2552,9 @@ export default class JiaZai extends cc.Component { if (cc.fx.GameConfig.GM_INFO.addLevel > 4) { this.addSelfToRank(this.careerRank.rankData); } + for (let i = 0; i < this.careerRank.rankData.length; i++) { + this.careerRank.rankData[i].rank = i + 1; + } if (this.RankNode != null && this.RankNode != undefined) { this.RankNode.opacity = 0; this.RankNode.zIndex = 3; @@ -2575,7 +2588,6 @@ export default class JiaZai extends cc.Component { cc.error(err.message || err); return; } - this.RankNode = cc.instantiate(prefab); if (callback) callback(); diff --git a/assets/Script/Map.ts b/assets/Script/Map.ts index c413ae8..e213bbd 100644 --- a/assets/Script/Map.ts +++ b/assets/Script/Map.ts @@ -45,6 +45,9 @@ export default class MapConroler extends cc.Component { @property(cc.Prefab) wallRevolvingPrefab: cc.Prefab = null; + @property(cc.SpriteAtlas) + CityName: cc.SpriteAtlas = null; + @property(cc.Button) timeBtn: cc.Button = null; @property(cc.Button) @@ -2118,14 +2121,13 @@ export default class MapConroler extends cc.Component { if (cc.fx.GameConfig.GM_INFO.level >= 21) { this.setPassProgress(); } - // if (cc.fx.GameConfig.GM_INFO.addLevel == 5) { - // this.createRank(); - // } + if (cc.fx.GameConfig.GM_INFO.addLevel >= 5) { + this.createRank(); + } // else if (cc.fx.GameConfig.GM_INFO.addLevel < 5) { // this.createCareer(); // } this.createCareer(); - this.Settlement(); if (cc.fx.GameConfig.GM_INFO.level >= 17) { this.node.parent.parent.getChildByName("Win").getChildByName("WinStreak").active = true; @@ -4106,8 +4108,6 @@ export default class MapConroler extends cc.Component { //创建 入职界面 createCareer() { - let Career = this.node.parent.parent.getChildByName("Win").getChildByName("Career"); - let progress = Career.getChildByName("progress"); let max = false; if (cc.fx.GameConfig.GM_INFO.addLevel == 4) { let address = cc.fx.StorageMessage.getStorage("address"); @@ -4124,6 +4124,12 @@ export default class MapConroler extends cc.Component { } } cc.fx.GameConfig.GM_INFO.addLevel += 1; + if (cc.fx.GameConfig.GM_INFO.addLevel > 5) { + return; + } + this.node.parent.parent.getChildByName("Win").getChildByName("Rank").active = false; + let Career = this.node.parent.parent.getChildByName("Win").getChildByName("Career"); + let progress = Career.getChildByName("progress"); let addLevel = cc.fx.GameConfig.GM_INFO.addLevel; if (addLevel > 5) { addLevel = 5; @@ -4182,10 +4188,20 @@ export default class MapConroler extends cc.Component { } createRank() { + console.log("通过关卡数量:", cc.fx.GameConfig.GM_INFO.addLevel); let rank = this.node.parent.parent.getChildByName("Win").getChildByName("Rank"); let Career = this.node.parent.parent.getChildByName("Win").getChildByName("Career"); rank.active = true; Career.active = false; + + + NumberToImage.numberToImageNodes4(cc.fx.GameConfig.GM_INFO.addLevel, 43, 15, "company_", rank.getChildByName("addLevel"), true); + for (let i = 0; i < rank.getChildByName("addLevel").children.length; i++) { + rank.getChildByName("addLevel").children[i].color = cc.Color.WHITE; + } + + rank.getChildByName("cityName").getComponent(cc.Sprite).spriteFrame = this.CityName.getSpriteFrame(cc.fx.GameConfig.GM_INFO.address); + } @@ -4209,6 +4225,7 @@ export default class MapConroler extends cc.Component { let coins4 = this.gameOverNode.getChildByName("coins4"); let caidai = this.gameOverNode.getChildByName("caidai"); + // 初始化所有元素为隐藏状态 title.active = false; homeBtn.active = false; @@ -4247,7 +4264,7 @@ export default class MapConroler extends cc.Component { let homeBtn = this.gameOverNode.getChildByName("homeBtn"); let nextBtn = this.gameOverNode.getChildByName("nextBtn"); let tiaodik = this.gameOverNode.getChildByName("tiaodik"); - + let ruzhi = this.gameOverNode.getChildByName("Ruzhi"); cc.tween(homeBtn) // .to(0, { position: cc.v3(0, -680, 0), scale: 0 }) .call(() => { @@ -4295,6 +4312,43 @@ export default class MapConroler extends cc.Component { this.playDecorationGroup(); }) .start(); + + ruzhi.getChildByName("yinzhang").active = false; + ruzhi.getChildByName("line").active = false; + ruzhi.active = false; + if (cc.fx.GameConfig.GM_INFO.addLevel == 5) { + cc.tween(ruzhi) + .delay(1) + .call(() => { + ruzhi.active = true; + cc.tween(ruzhi.getChildByName("bg")) + .to(0.3, { rotation: -5, scaleX: 1, scaleY: 1 }) + .start(); + cc.tween(ruzhi.getChildByName("caidai1")) + .delay(0.6) + .to(0.2, { scaleX: 1, scaleY: 1 }) + .start(); + cc.tween(ruzhi.getChildByName("caidai2")) + .delay(0.6) + .to(0.2, { scaleX: 1, scaleY: 1 }) + .start(); + cc.tween(ruzhi.getChildByName("yinzhang")) + .delay(0.5) + .call(() => { + ruzhi.getChildByName("yinzhang").active = true; + }) + .to(0.2, { scaleX: 1, scaleY: 1 }) + .call(() => { + ruzhi.getChildByName("line").active = true; + ruzhi.getChildByName("line").runAction(cc.rotateTo(50, 1080).repeatForever()); + }) + .start(); + + }) + .start(); + } + + } // 播放装饰元素动画 @@ -4305,6 +4359,7 @@ export default class MapConroler extends cc.Component { let caidai = this.gameOverNode.getChildByName("caidai"); // let diguan = this.gameOverNode.getChildByName("gongxi").getChildByName("guankazi"); let diguan = this.gameOverNode.getChildByName("diguan"); + let ruzhi = this.gameOverNode.getChildByName("Ruzhi"); diguan.scaleX = diguan.scaleY = 0.01; diguan.active = true; // caidai 先播放骨骼动画 diff --git a/assets/Script/module/Tool/GameTool.ts b/assets/Script/module/Tool/GameTool.ts index 638b4c4..331971b 100644 --- a/assets/Script/module/Tool/GameTool.ts +++ b/assets/Script/module/Tool/GameTool.ts @@ -390,7 +390,7 @@ var GameTool = { MiniGameSdk.API.shushu_SetSuperProperties(null, null); } let updateLocation = false; - console.log("当日关卡通过数量___________:", cc.fx.GameConfig.GM_INFO.addLevel); + // console.log("当日关卡通过数量___________:", cc.fx.GameConfig.GM_INFO.addLevel); if (cc.fx.GameConfig.GM_INFO.addLevel == 4) { updateLocation = true; } @@ -419,8 +419,8 @@ var GameTool = { //关卡上限 maxLevel() { let jg = false; - if (cc.fx.GameConfig.GM_INFO.level > 709) { - cc.fx.GameConfig.GM_INFO.level = 710; + if (cc.fx.GameConfig.GM_INFO.level > 689) { + cc.fx.GameConfig.GM_INFO.level = 690; jg = true; } return jg;