优化更新首页列表

This commit is contained in:
COMPUTER\EDY 2025-11-24 18:23:39 +08:00
parent 40b3abdd26
commit 759e3db632
4 changed files with 106 additions and 36 deletions

View File

@ -4729,6 +4729,9 @@
"wallRevolvingPrefab": { "wallRevolvingPrefab": {
"__uuid__": "a7045129-1b59-44d6-99a0-6316107b3b7b" "__uuid__": "a7045129-1b59-44d6-99a0-6316107b3b7b"
}, },
"CityName": {
"__uuid__": "933f7976-6238-4e66-bef6-a7e118893b12"
},
"timeBtn": { "timeBtn": {
"__id__": 77 "__id__": 77
}, },
@ -17082,7 +17085,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 0,
-546.13, -544.13,
0, 0,
0, 0,
0, 0,
@ -17235,8 +17238,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-79.685, -65,
-5.099, -9.823,
0, 0,
0, 0,
0, 0,
@ -17268,7 +17271,7 @@
"__id__": 348 "__id__": 348
}, },
"_children": [], "_children": [],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 353 "__id__": 353
@ -17368,7 +17371,7 @@
"__id__": 355 "__id__": 355
} }
], ],
"_active": true, "_active": false,
"_components": [], "_components": [],
"_prefab": null, "_prefab": null,
"_opacity": 255, "_opacity": 255,
@ -17552,7 +17555,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
303.654, 303.654,
24.556, -8.444,
0, 0,
0, 0,
0, 0,
@ -21045,7 +21048,7 @@
"__id__": 426 "__id__": 426
}, },
"_children": [], "_children": [],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 431 "__id__": 431
@ -21182,10 +21185,10 @@
0, 0,
0, 0,
0, 0,
-0.043619387365336, 0.04361938736533583,
0.9990482215818578, -0.9990482215818578,
1, 0.01,
1, 0.01,
1 1
] ]
}, },
@ -21193,7 +21196,7 @@
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0, "y": 0,
"z": -5 "z": -365
}, },
"_skewX": 0, "_skewX": 0,
"_skewY": 0, "_skewY": 0,
@ -21560,8 +21563,8 @@
0, 0,
0, 0,
1, 1,
1, 0.01,
1, 0.01,
1 1
] ]
}, },
@ -21656,8 +21659,8 @@
0, 0,
1, 1,
6.123233995736766e-17, 6.123233995736766e-17,
1, 0.01,
1, 0.01,
1 1
] ]
}, },
@ -21716,7 +21719,7 @@
"__id__": 426 "__id__": 426
}, },
"_children": [], "_children": [],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 445 "__id__": 445
@ -21752,8 +21755,8 @@
0, 0,
0.043619387365336, 0.043619387365336,
0.9990482215818578, 0.9990482215818578,
1, 5,
1, 5,
1 1
] ]
}, },

View File

@ -2494,6 +2494,7 @@ export default class JiaZai extends cc.Component {
.start() .start()
}) })
} }
// console.log("rankingData_________", rankData);
}); });
} }
@ -2523,6 +2524,14 @@ export default class JiaZai extends cc.Component {
}) })
if (rankingData.length >= 8) { if (rankingData.length >= 8) {
let jg = false;
for (let j = 0; j < 8; j++) {
if (rankingData[j].id == cc.fx.GameConfig.GM_INFO.uid) {
jg = true;
return;
}
}
if (!jg) {
for (let i = 0; i < rankingData.length; i++) { for (let i = 0; i < rankingData.length; i++) {
if (rankingData[i].addLevel < selfData.addLevel) { if (rankingData[i].addLevel < selfData.addLevel) {
rankingData.splice(i, 0, selfData); rankingData.splice(i, 0, selfData);
@ -2532,6 +2541,7 @@ export default class JiaZai extends cc.Component {
} }
if (!self) rankingData[7] = selfData if (!self) rankingData[7] = selfData
} }
}
else { else {
// rankingData.push(selfData) // rankingData.push(selfData)
} }
@ -2542,6 +2552,9 @@ export default class JiaZai extends cc.Component {
if (cc.fx.GameConfig.GM_INFO.addLevel > 4) { if (cc.fx.GameConfig.GM_INFO.addLevel > 4) {
this.addSelfToRank(this.careerRank.rankData); 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) { if (this.RankNode != null && this.RankNode != undefined) {
this.RankNode.opacity = 0; this.RankNode.opacity = 0;
this.RankNode.zIndex = 3; this.RankNode.zIndex = 3;
@ -2575,7 +2588,6 @@ export default class JiaZai extends cc.Component {
cc.error(err.message || err); cc.error(err.message || err);
return; return;
} }
this.RankNode = cc.instantiate(prefab); this.RankNode = cc.instantiate(prefab);
if (callback) if (callback)
callback(); callback();

View File

@ -45,6 +45,9 @@ export default class MapConroler extends cc.Component {
@property(cc.Prefab) @property(cc.Prefab)
wallRevolvingPrefab: cc.Prefab = null; wallRevolvingPrefab: cc.Prefab = null;
@property(cc.SpriteAtlas)
CityName: cc.SpriteAtlas = null;
@property(cc.Button) @property(cc.Button)
timeBtn: cc.Button = null; timeBtn: cc.Button = null;
@property(cc.Button) @property(cc.Button)
@ -2118,14 +2121,13 @@ export default class MapConroler extends cc.Component {
if (cc.fx.GameConfig.GM_INFO.level >= 21) { if (cc.fx.GameConfig.GM_INFO.level >= 21) {
this.setPassProgress(); this.setPassProgress();
} }
// if (cc.fx.GameConfig.GM_INFO.addLevel == 5) { if (cc.fx.GameConfig.GM_INFO.addLevel >= 5) {
// this.createRank(); this.createRank();
// } }
// else if (cc.fx.GameConfig.GM_INFO.addLevel < 5) { // else if (cc.fx.GameConfig.GM_INFO.addLevel < 5) {
// this.createCareer(); // this.createCareer();
// } // }
this.createCareer(); this.createCareer();
this.Settlement(); this.Settlement();
if (cc.fx.GameConfig.GM_INFO.level >= 17) { if (cc.fx.GameConfig.GM_INFO.level >= 17) {
this.node.parent.parent.getChildByName("Win").getChildByName("WinStreak").active = true; this.node.parent.parent.getChildByName("Win").getChildByName("WinStreak").active = true;
@ -4106,8 +4108,6 @@ export default class MapConroler extends cc.Component {
//创建 入职界面 //创建 入职界面
createCareer() { createCareer() {
let Career = this.node.parent.parent.getChildByName("Win").getChildByName("Career");
let progress = Career.getChildByName("progress");
let max = false; let max = false;
if (cc.fx.GameConfig.GM_INFO.addLevel == 4) { if (cc.fx.GameConfig.GM_INFO.addLevel == 4) {
let address = cc.fx.StorageMessage.getStorage("address"); 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; 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; let addLevel = cc.fx.GameConfig.GM_INFO.addLevel;
if (addLevel > 5) { if (addLevel > 5) {
addLevel = 5; addLevel = 5;
@ -4182,10 +4188,20 @@ export default class MapConroler extends cc.Component {
} }
createRank() { createRank() {
console.log("通过关卡数量:", cc.fx.GameConfig.GM_INFO.addLevel);
let rank = this.node.parent.parent.getChildByName("Win").getChildByName("Rank"); let rank = this.node.parent.parent.getChildByName("Win").getChildByName("Rank");
let Career = this.node.parent.parent.getChildByName("Win").getChildByName("Career"); let Career = this.node.parent.parent.getChildByName("Win").getChildByName("Career");
rank.active = true; rank.active = true;
Career.active = false; 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 coins4 = this.gameOverNode.getChildByName("coins4");
let caidai = this.gameOverNode.getChildByName("caidai"); let caidai = this.gameOverNode.getChildByName("caidai");
// 初始化所有元素为隐藏状态 // 初始化所有元素为隐藏状态
title.active = false; title.active = false;
homeBtn.active = false; homeBtn.active = false;
@ -4247,7 +4264,7 @@ export default class MapConroler extends cc.Component {
let homeBtn = this.gameOverNode.getChildByName("homeBtn"); let homeBtn = this.gameOverNode.getChildByName("homeBtn");
let nextBtn = this.gameOverNode.getChildByName("nextBtn"); let nextBtn = this.gameOverNode.getChildByName("nextBtn");
let tiaodik = this.gameOverNode.getChildByName("tiaodik"); let tiaodik = this.gameOverNode.getChildByName("tiaodik");
let ruzhi = this.gameOverNode.getChildByName("Ruzhi");
cc.tween(homeBtn) cc.tween(homeBtn)
// .to(0, { position: cc.v3(0, -680, 0), scale: 0 }) // .to(0, { position: cc.v3(0, -680, 0), scale: 0 })
.call(() => { .call(() => {
@ -4295,6 +4312,43 @@ export default class MapConroler extends cc.Component {
this.playDecorationGroup(); this.playDecorationGroup();
}) })
.start(); .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 caidai = this.gameOverNode.getChildByName("caidai");
// let diguan = this.gameOverNode.getChildByName("gongxi").getChildByName("guankazi"); // let diguan = this.gameOverNode.getChildByName("gongxi").getChildByName("guankazi");
let diguan = this.gameOverNode.getChildByName("diguan"); let diguan = this.gameOverNode.getChildByName("diguan");
let ruzhi = this.gameOverNode.getChildByName("Ruzhi");
diguan.scaleX = diguan.scaleY = 0.01; diguan.scaleX = diguan.scaleY = 0.01;
diguan.active = true; diguan.active = true;
// caidai 先播放骨骼动画 // caidai 先播放骨骼动画

View File

@ -390,7 +390,7 @@ var GameTool = {
MiniGameSdk.API.shushu_SetSuperProperties(null, null); MiniGameSdk.API.shushu_SetSuperProperties(null, null);
} }
let updateLocation = false; 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) { if (cc.fx.GameConfig.GM_INFO.addLevel == 4) {
updateLocation = true; updateLocation = true;
} }
@ -419,8 +419,8 @@ var GameTool = {
//关卡上限 //关卡上限
maxLevel() { maxLevel() {
let jg = false; let jg = false;
if (cc.fx.GameConfig.GM_INFO.level > 709) { if (cc.fx.GameConfig.GM_INFO.level > 689) {
cc.fx.GameConfig.GM_INFO.level = 710; cc.fx.GameConfig.GM_INFO.level = 690;
jg = true; jg = true;
} }
return jg; return jg;