refactor(mission): 优化战斗关卡UI显示与逻辑

1.  调整MissionComp注释与战斗计时获取逻辑
2.  移除关卡波数显示中的总波数限制,只显示当前波数
3.  更新mission.prefab的UI布局与默认显示文本
4.  调整地图prefab的物体位置
5.  修改bg2动画的帧率与时长参数
This commit is contained in:
panFD
2026-06-13 22:42:09 +08:00
parent 9c2c0a1621
commit 50f43c227a
4 changed files with 64 additions and 40 deletions

View File

@@ -12074,7 +12074,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 459.147,
"x": 371.47,
"y": -29.439,
"z": 0
},
@@ -21924,7 +21924,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 459.147,
"x": 371.47,
"y": -29.439,
"z": 0
},

View File

@@ -7,11 +7,11 @@
"embeddedPlayerGroups": []
},
"_native": "",
"sample": 5,
"sample": 1,
"speed": 1,
"wrapMode": 2,
"enableTrsBlending": false,
"_duration": 6,
"_duration": 30,
"_hash": 500763545,
"_tracks": [
{
@@ -77,7 +77,7 @@
"__type__": "cc.RealCurve",
"_times": [
0,
6
30
],
"_values": [
{
@@ -90,7 +90,9 @@
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
"__editorExtras__": {
"broken": null
}
},
{
"__type__": "cc.RealKeyframeValue",
@@ -102,7 +104,9 @@
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
"__editorExtras__": {
"broken": null
}
}
],
"preExtrapolation": 1,
@@ -118,7 +122,7 @@
"__type__": "cc.RealCurve",
"_times": [
0,
6
30
],
"_values": [
{
@@ -131,7 +135,9 @@
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
"__editorExtras__": {
"broken": null
}
},
{
"__type__": "cc.RealKeyframeValue",
@@ -143,7 +149,9 @@
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
"__editorExtras__": {
"broken": null
}
}
],
"preExtrapolation": 1,
@@ -159,7 +167,7 @@
"__type__": "cc.RealCurve",
"_times": [
0,
6
30
],
"_values": [
{
@@ -172,7 +180,9 @@
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
"__editorExtras__": {
"broken": null
}
},
{
"__type__": "cc.RealKeyframeValue",
@@ -184,7 +194,9 @@
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
"__editorExtras__": {
"broken": null
}
}
],
"preExtrapolation": 1,
@@ -251,7 +263,7 @@
"__type__": "cc.RealCurve",
"_times": [
0,
6
30
],
"_values": [
{
@@ -264,7 +276,9 @@
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
"__editorExtras__": {
"broken": null
}
},
{
"__type__": "cc.RealKeyframeValue",
@@ -276,7 +290,9 @@
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
"__editorExtras__": {
"broken": null
}
}
],
"preExtrapolation": 1,
@@ -292,7 +308,7 @@
"__type__": "cc.RealCurve",
"_times": [
0,
6
30
],
"_values": [
{
@@ -305,7 +321,9 @@
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
"__editorExtras__": {
"broken": null
}
},
{
"__type__": "cc.RealKeyframeValue",
@@ -317,7 +335,9 @@
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
"__editorExtras__": {
"broken": null
}
}
],
"preExtrapolation": 1,
@@ -333,7 +353,7 @@
"__type__": "cc.RealCurve",
"_times": [
0,
6
30
],
"_values": [
{
@@ -346,7 +366,9 @@
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
"__editorExtras__": {
"broken": null
}
},
{
"__type__": "cc.RealKeyframeValue",
@@ -358,7 +380,9 @@
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
"__editorExtras__": {
"broken": null
}
}
],
"preExtrapolation": 1,

View File

@@ -180,7 +180,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"x": -259.716,
"y": 0,
"z": 0
},
@@ -271,7 +271,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 510,
"width": 300,
"height": 66
},
"_anchorPoint": {
@@ -313,7 +313,7 @@
},
"_type": 1,
"_fillType": 0,
"_sizeMode": 1,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
@@ -443,7 +443,7 @@
"b": 255,
"a": 255
},
"_string": "第 1/20 波",
"_string": "第 1 波",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 26,
@@ -821,8 +821,8 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -36.584,
"x": 295.012,
"y": 0,
"z": 0
},
"_lrot": {
@@ -1110,8 +1110,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
"width": 720,
"height": 50
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -1136,11 +1136,11 @@
"__prefab": {
"__id__": 44
},
"_alignFlags": 17,
"_alignFlags": 41,
"_target": null,
"_left": 0,
"_right": 0,
"_top": 39.067999999999984,
"_top": 64.06799999999998,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
@@ -1150,7 +1150,7 @@
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalWidth": 100,
"_originalHeight": 0,
"_alignMode": 2,
"_lockFlags": 0,
@@ -14302,7 +14302,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 761.798,
"y": 640,
"y": 1020,
"z": 0
},
"_lrot": {
@@ -14903,11 +14903,11 @@
"__prefab": {
"__id__": 701
},
"_alignFlags": 2,
"_alignFlags": 1,
"_target": null,
"_left": 0,
"_right": 0,
"_top": 448.34799999999996,
"_top": 200,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
@@ -15377,7 +15377,7 @@
"propertyPath": [
"_active"
],
"value": true
"value": false
},
{
"__type__": "CCPropertyOverrideInfo",

View File

@@ -117,7 +117,7 @@ export class MissionComp extends CCComp {
// ======================== 运行时状态 ========================
/** 战斗已耗时(秒),正向计时 */
/** 本波战斗已耗时(秒),正向计时,用于自适应难度评估 */
clearTime: number = 0
/** 剩余复活次数 */
revive_times: number = 1;
@@ -242,7 +242,7 @@ export class MissionComp extends CCComp {
/** 更新时间/波数显示(仅在秒数变化时更新以减少 Label 操作) */
update_time() {
const remainSecond = Math.floor(this.clearTime);
const remainSecond = Math.floor(smc.vmdata.mission_data.fight_time);
if (remainSecond === this.lastTimeSecond) return;
this.lastTimeSecond = remainSecond;
let m = Math.floor(remainSecond / 60);
@@ -400,7 +400,7 @@ export class MissionComp extends CCComp {
const label = phaseNode.getComponent(Label);
if (label) {
const wave = Math.max(1, this.currentWave || (smc.vmdata && smc.vmdata.mission_data ? smc.vmdata.mission_data.level : 1) || 1);
label.string = `${wave}/15`;
label.string = `${wave}`;
}
// 阶段切换动感表现:只在进入战斗阶段跳动一下,让流程充满心流体验