5 Commits

Author SHA1 Message Date
panw
051342a9c4 feat(ui): 将卡牌槽位从4个调整为3个并更新布局
- 隐藏第四个卡牌槽位,将抽卡逻辑从4张改为3张
- 调整卡牌预制体中的位置和尺寸以适配新布局
- 更新角色控制器UI的宽度和间距设置
- 修改卡牌放大时的位置判定阈值和高度
2026-04-24 10:05:16 +08:00
panw
5dfc790412 fix(地图): 修复第一波怪物到来时错误进入战斗结束阶段的问题
第一波怪物到来时不应进入 BattleEnd 阶段,因为不存在"上一波"需要结束。现在第一波会直接显示波次提示动画,避免被加载界面遮挡。
2026-04-24 09:45:22 +08:00
panw
a039324fbc fix(ui): 调整任务界面布局并优化Boss波次计时显示
- 调整 role_controller.prefab 中多个节点的位置、缩放和文本组件尺寸,优化界面布局
- 修改任务组件逻辑,在Boss波次时显示无限时间符号"∞"并暂停倒计时
- 更新文本字体大小、对齐方式和溢出设置,改善视觉表现
2026-04-24 09:33:04 +08:00
panw
cfd0faa38c fix: 修正阶段切换动画触发条件与目标节点
调整任务阶段切换时的动画表现,仅在进入战斗阶段时触发缩放动画。
将动画目标节点从 phaseNode 改为 time_node,并调整缩放比例以优化视觉反馈。
2026-04-24 09:25:36 +08:00
panw
c20be9f17b feat(ui): 优化任务界面时间显示和阶段提示动画
- 移除时间显示中的波次前缀,仅保留分钟和秒数
- 调整阶段提示动画的激活时机,避免首次显示异常
- 修复阶段切换时的文本显示逻辑,显示当前波次进度
- 删除已废弃的 tip.prefab 资源文件
2026-04-24 09:25:10 +08:00
7 changed files with 8012 additions and 7976 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,505 +0,0 @@
[
{
"__type__": "cc.Prefab",
"_name": "tip",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "tip",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 10
}
],
"_active": true,
"_components": [
{
"__id__": 20
}
],
"_prefab": {
"__id__": 22
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 640,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "bg",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
},
{
"__id__": 5
},
{
"__id__": 7
}
],
"_prefab": {
"__id__": 9
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -4.773,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 4
},
"_contentSize": {
"__type__": "cc.Size",
"width": 780,
"height": 130
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "1003GdjfpKXJE/TG1yWDuH"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 6
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@eb418",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 1,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "60UFmTMHJPWp2w+0Gho1h8"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 8
},
"_alignFlags": 40,
"_target": null,
"_left": -30,
"_right": -30,
"_top": 0,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 428,
"_originalHeight": 0,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "63ZPc/lvZEMp22HeC+sVFO"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "4ebCuCwKhIYKWQP8OrCFBS",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "lab",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 11
},
{
"__id__": 13
},
{
"__id__": 15
},
{
"__id__": 17
}
],
"_prefab": {
"__id__": 19
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 10
},
"_enabled": true,
"__prefab": {
"__id__": 12
},
"_contentSize": {
"__type__": "cc.Size",
"width": 670,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "14Q/gAI7JJuIWi5WFPFHjn"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 10
},
"_enabled": true,
"__prefab": {
"__id__": 14
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_string": "这里是信息",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 41,
"_fontSize": 40,
"_fontFamily": "Arial",
"_lineHeight": 40,
"_overflow": 2,
"_enableWrapText": true,
"_font": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_isItalic": false,
"_isBold": true,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 1,
"_enableOutline": true,
"_outlineColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_outlineWidth": 4,
"_enableShadow": false,
"_shadowColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_shadowOffset": {
"__type__": "cc.Vec2",
"x": 2,
"y": 2
},
"_shadowBlur": 2,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "f4PtuT0TNHiaf1kHgltRjN"
},
{
"__type__": "110c8vEd5NEPL/N9meGQnaX",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 10
},
"_enabled": true,
"__prefab": {
"__id__": 16
},
"_params": [],
"_dataID": "",
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "0bsDdkC31Dx6EJbtMWR83S"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 10
},
"_enabled": true,
"__prefab": {
"__id__": 18
},
"_alignFlags": 45,
"_target": null,
"_left": 25,
"_right": 25,
"_top": 10,
"_bottom": 10,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 600,
"_originalHeight": 54.4,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "57At9q+gBFlZN9Nieh/UVp"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "a1CYFX8AxIUpCik88M7h8G",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 21
},
"_contentSize": {
"__type__": "cc.Size",
"width": 720,
"height": 120
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "ef3+UDPdVJGoz5oexdMgv2"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "18X8QQ53xKDbV/EH/Cm3i4",
"instance": null,
"targetOverrides": null
}
]

View File

@@ -1,13 +0,0 @@
{
"ver": "1.1.50",
"importer": "prefab",
"imported": true,
"uuid": "c09817a2-70d1-4e67-8f4c-60d9ff67bd1f",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "tip"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -416,7 +416,7 @@ export class CardComp extends CCComp {
// x轴偏移逻辑
if (this.restPosition.x < -200) { // -260
targetX = this.restPosition.x + 30;
} else if (this.restPosition.x > 200) { // 260
} else if (this.restPosition.x > 80) { // 260 -> 86也算
targetX = this.restPosition.x - 30;
}
// y轴变大时 +35
@@ -549,7 +549,7 @@ export class CardComp extends CCComp {
if (this.isEnlarged) {
if (this.restPosition.x <= -200) {
baseX = this.restPosition.x + 30;
} else if (this.restPosition.x >= 200) {
} else if (this.restPosition.x >= 80) {
baseX = this.restPosition.x - 30;
}
baseY = this.restPosition.y + 35;
@@ -657,7 +657,7 @@ export class CardComp extends CCComp {
this.node.setSiblingIndex(99); // 变大时提到最前
if (this.restPosition.x <= -200) { // -260
targetX = this.restPosition.x + 30;
} else if (this.restPosition.x >= 200) { // 260
} else if (this.restPosition.x >= 80) { // 260 -> 86也算
targetX = this.restPosition.x - 30;
}
targetY = this.restPosition.y + 35; // y轴增加
@@ -705,7 +705,7 @@ export class CardComp extends CCComp {
// ---- 按卡牌类型渲染具体内容 ----
const uiTrans = this.node.getComponent(UITransform);
if (uiTrans) {
uiTrans.setContentSize(this.isEnlarged ? 230 : 170, this.isEnlarged ? 300 : 230);
uiTrans.setContentSize(this.isEnlarged ? 230 : 170, this.isEnlarged ? 340 : 230);
const widget = this.node.getComponent(Widget);
if (widget) widget.updateAlignment();
}
@@ -714,14 +714,14 @@ export class CardComp extends CCComp {
if (this.BG_node) {
const bgTrans = this.BG_node.getComponent(UITransform);
if (bgTrans) {
bgTrans.setContentSize(this.isEnlarged ? 230 : 170, this.isEnlarged ? 300 : 230);
bgTrans.setContentSize(this.isEnlarged ? 230 : 170, this.isEnlarged ? 340 : 230);
const widget = this.BG_node.getComponent(Widget);
if (widget) widget.updateAlignment();
}
this.BG_node.children.forEach(child => {
const childTrans = child.getComponent(UITransform);
if (childTrans) {
childTrans.setContentSize(this.isEnlarged ? 230 : 170, this.isEnlarged ? 300 : 230);
childTrans.setContentSize(this.isEnlarged ? 230 : 170, this.isEnlarged ? 340 : 230);
const widget = child.getComponent(Widget);
if (widget) widget.updateAlignment();
}
@@ -741,14 +741,14 @@ export class CardComp extends CCComp {
if (this.HF_node) {
const hfTrans = this.HF_node.getComponent(UITransform);
if (hfTrans) {
hfTrans.setContentSize(this.isEnlarged ? 230 : 170, this.isEnlarged ? 300 : 230);
hfTrans.setContentSize(this.isEnlarged ? 230 : 170, this.isEnlarged ? 340 : 230);
const widget = this.HF_node.getComponent(Widget);
if (widget) widget.updateAlignment();
}
this.HF_node.children.forEach(child => {
const childTrans = child.getComponent(UITransform);
if (childTrans) {
childTrans.setContentSize(this.isEnlarged ? 230 : 170, this.isEnlarged ? 300 : 230);
childTrans.setContentSize(this.isEnlarged ? 230 : 170, this.isEnlarged ? 340 : 230);
const widget = child.getComponent(Widget);
if (widget) widget.updateAlignment();
}
@@ -758,14 +758,14 @@ export class CardComp extends CCComp {
if (this.NF_node) {
const nfTrans = this.NF_node.getComponent(UITransform);
if (nfTrans) {
nfTrans.setContentSize(this.isEnlarged ? 230 : 170, this.isEnlarged ? 300 : 230);
nfTrans.setContentSize(this.isEnlarged ? 230 : 170, this.isEnlarged ? 340 : 230);
const widget = this.NF_node.getComponent(Widget);
if (widget) widget.updateAlignment();
}
this.NF_node.children.forEach(child => {
const childTrans = child.getComponent(UITransform);
if (childTrans) {
childTrans.setContentSize(this.isEnlarged ? 230 : 170, this.isEnlarged ? 300 : 230);
childTrans.setContentSize(this.isEnlarged ? 230 : 170, this.isEnlarged ? 340 : 230);
const widget = child.getComponent(Widget);
if (widget) widget.updateAlignment();
}
@@ -776,7 +776,7 @@ export class CardComp extends CCComp {
if (hbNode) {
const hbTrans = hbNode.getComponent(UITransform);
if (hbTrans) {
hbTrans.setContentSize(this.isEnlarged ? 230 : 170, this.isEnlarged ? 300 : 230);
hbTrans.setContentSize(this.isEnlarged ? 230 : 170, this.isEnlarged ? 340 : 230);
const widget = hbNode.getComponent(Widget);
if (widget) widget.updateAlignment();
}
@@ -905,7 +905,7 @@ export class CardComp extends CCComp {
if (this.isEnlarged) {
if (this.restPosition.x <= -200) {
targetX = this.restPosition.x + 30;
} else if (this.restPosition.x >= 200) {
} else if (this.restPosition.x >= 80) {
targetX = this.restPosition.x - 30;
}
targetY = this.restPosition.y + 35;

View File

@@ -520,7 +520,10 @@ export class MissionCardComp extends CCComp {
/** 将四个卡槽节点映射为 CardComp形成固定顺序控制数组 */
private cacheCardComps() {
const nodes = [this.card1, this.card2, this.card3, this.card4];
if (this.card4) {
this.card4.active = false;
}
const nodes = [this.card1, this.card2, this.card3];
this.cardComps = nodes
.map(node => node?.getComponent(CardComp))
.filter((comp): comp is CardComp => !!comp);
@@ -641,7 +644,7 @@ export class MissionCardComp extends CCComp {
});
}
/** 构建本次抽卡结果,保证最终可分发4条数据 */
/** 构建本次抽卡结果,保证最终可分发3条数据 */
private buildDrawCards(): CardConfig[] {
let targetType: CardType | CardType[] | undefined = undefined;
if (this.isBattlePhase) {
@@ -651,11 +654,11 @@ export class MissionCardComp extends CCComp {
}
const cards = getCardsByLv(this.poolLv, targetType);
/** 正常情况下直接取前4 */
if (cards.length >= 4) return cards.slice(0, 4);
/** 兜底:当返回不足4张时循环补齐,保证分发不缺位 */
/** 正常情况下直接取前3 */
if (cards.length >= 3) return cards.slice(0, 3);
/** 兜底:当返回不足3张时循环补齐,保证分发不缺位 */
const filled = [...cards];
while (filled.length < 4) {
while (filled.length < 3) {
const fallback = getCardsByLv(this.poolLv, targetType);
if (fallback.length === 0) break;
filled.push(fallback[filled.length % fallback.length]);
@@ -665,14 +668,14 @@ export class MissionCardComp extends CCComp {
private tryRefreshHeroCards(heroType?: HType, targetPoolLv?: number): boolean {
const cards = drawCardsByRule(this.poolLv, {
count: 4,
count: 3,
type: CardType.Hero,
heroType,
targetPoolLv
});
if (cards.length <= 0) return false;
this.layoutCardSlots();
this.dispatchCardsToSlots(cards.slice(0, 4));
this.dispatchCardsToSlots(cards.slice(0, 3));
return true;
}
@@ -708,15 +711,12 @@ export class MissionCardComp extends CCComp {
private layoutCardSlots() {
const count = this.cardComps.length;
if (count === 0) return;
const startX = -((count - 1) * this.cardWidth) / 2;
for (let i = 0; i < count; i++) {
const x = startX + i * this.cardWidth;
this.cardComps[i].setSlotPosition(x);
this.cardComps[i].setSlotPosition(this.cardsPos[i]);
}
mLogger.log(this.debugMode, "MissionCardComp", "layout card slots", {
count,
cardWidth: this.cardWidth,
startX
cardWidth: this.cardWidth
});
}

View File

@@ -160,6 +160,8 @@ export class MissionComp extends CCComp {
private monsterCountSyncTimer: number = 0;
/** 当前波数 */
private currentWave: number = 0;
/** 是否为Boss波次 */
private isBossWave: boolean = false;
/** 上一次发放金币奖励的波数(防止重复发放) */
private lastPrepareCoinWave: number = 0;
/** 当前任务阶段 */
@@ -216,13 +218,15 @@ export class MissionComp extends CCComp {
this.syncMonsterSpawnState(dt)
if(smc.mission.stop_mon_action) return
smc.vmdata.mission_data.fight_time+=dt
this.FightTime-=dt
this.update_time();
if (this.FightTime <= 0) {
// 时间到了,自动结束战斗进入准备阶段
this.FightTime = FightSet.FiIGHT_TIME;
oops.message.dispatchEvent("TimeUpAdvanceWave");
if (!this.isBossWave) {
this.FightTime-=dt
if (this.FightTime <= 0) {
// 时间到了,自动结束战斗进入准备阶段
this.FightTime = FightSet.FiIGHT_TIME;
oops.message.dispatchEvent("TimeUpAdvanceWave");
}
}
this.update_time();
}
}
@@ -230,6 +234,16 @@ export class MissionComp extends CCComp {
/** 更新时间/波数显示(仅在秒数变化时更新以减少 Label 操作) */
update_time(){
if (this.isBossWave) {
const str = "∞";
if (str != this.lastTimeStr) {
this.time_node.getChildByName("time").getComponent(Label).string = str;
this.lastTimeStr = str;
this.lastTimeSecond = -1;
}
return;
}
const time = Math.max(0, this.FightTime);
const remainSecond = Math.floor(time);
if (remainSecond === this.lastTimeSecond) return;
@@ -237,7 +251,7 @@ export class MissionComp extends CCComp {
let m = Math.floor(remainSecond / 60);
let s = remainSecond % 60;
const wave = Math.max(1, this.currentWave || smc.vmdata.mission_data.level || 1);
let str = `W${wave.toString().padStart(2, '0')} ${m.toString().padStart(2, '0')}:${s.toString().padStart(2, '0')}`;
let str = `${m.toString().padStart(2, '0')}:${s.toString().padStart(2, '0')}`;
if(str != this.lastTimeStr){
this.time_node.getChildByName("time").getComponent(Label).string = str;
this.lastTimeStr = str;
@@ -310,9 +324,13 @@ export class MissionComp extends CCComp {
return;
}
// 先激活节点,确保后续的组件刷新和渲染数据更新能正常生效
this.tooltip.active = true;
// 禁用 Widget 组件,防止其在 LateUpdate 中覆盖 tween 的位置修改
const widget = this.tooltip.getComponent(Widget);
if (widget) {
widget.updateAlignment(); // 强制刷新一次布局,防止第一次激活时尺寸未初始化
widget.enabled = false;
}
@@ -321,10 +339,10 @@ export class MissionComp extends CCComp {
const label = labNode.getComponent(Label);
if (label) {
label.string = phaseName;
label.updateRenderData(true); // 强制更新渲染数据,避免首次无文本
}
}
this.tooltip.active = true;
Tween.stopAllByTarget(this.tooltip);
// 动感动画设计:右侧进入 -> 屏幕中央(带有轻微的弹跳和滑动) -> 左侧飞出
@@ -374,18 +392,16 @@ export class MissionComp extends CCComp {
if (phaseNode) {
const label = phaseNode.getComponent(Label);
if (label) {
label.string = MissionComp.PhaseNameMap[targetPhase] || "未知";
const wave = Math.max(1, this.currentWave || (smc.vmdata && smc.vmdata.mission_data ? smc.vmdata.mission_data.level : 1) || 1);
label.string = `${wave}/20 波`;
}
// 阶段切换动感表现:针对阶段变化加入缩放与回弹动画,让流程充满心流体验
if (targetPhase === MissionPhase.PrepareStart ||
targetPhase === MissionPhase.PrepareEnd ||
targetPhase === MissionPhase.BattleStart ||
targetPhase === MissionPhase.BattleEnd) {
Tween.stopAllByTarget(phaseNode);
phaseNode.scale = v3(0.5, 0.5, 1);
tween(phaseNode)
.to(0.3, { scale: v3(1.5, 1.5, 1) }, { easing: "backOut" })
// 阶段切换动感表现:只在进入战斗阶段跳动一下,让流程充满心流体验
if (targetPhase === MissionPhase.BattleStart) {
Tween.stopAllByTarget(this.time_node);
this.time_node.scale = v3(1, 1, 1);
tween(this.time_node)
.to(0.3, { scale: v3(1.2, 1.2, 1) }, { easing: "backOut" })
.to(0.2, { scale: v3(1, 1, 1) }, { easing: "sineInOut" })
.start();
}
@@ -649,6 +665,7 @@ export class MissionComp extends CCComp {
smc.vmdata.mission_data.mon_max = Math.max(1, Math.floor(this.maxMonsterCount))
this.currentPhase = MissionPhase.None;
this.currentWave = 1;
this.isBossWave = false;
this.FightTime=FightSet.FiIGHT_TIME
this.rewards=[]
this.revive_times = 1;
@@ -684,8 +701,19 @@ export class MissionComp extends CCComp {
const wave = Number(data?.wave ?? 0);
if (wave <= 0) return;
// 在新一波到来时,先进入 BattleEnd触发上一波的战斗结束技能 (fend)2秒后自动进入下一波的准备阶段
this.changePhase(MissionPhase.BattleEnd);
this.isBossWave = !!data?.bossWave;
if (wave > 1) {
// 在新一波到来时,先进入 BattleEnd触发上一波的战斗结束技能 (fend)2秒后自动进入下一波的准备阶段
this.changePhase(MissionPhase.BattleEnd);
} else {
// 第1波不需要结束上一波延迟一点播放提示避免被开始游戏的loading遮挡
this.scheduleOnce(() => {
if (this.currentPhase === MissionPhase.Prepare) {
this.playTooltipAnim(`${wave}`);
}
}, 0.5);
}
this.currentWave = wave;
smc.vmdata.mission_data.level = wave;