更新动画

This commit is contained in:
COMPUTER\EDY 2026-07-10 13:40:28 +08:00
parent 9ce1cbeb78
commit 414afc9d3b

View File

@ -3431,10 +3431,26 @@ export default class MapConroler extends cc.Component {
return speed > 0 ? speed : 1; return speed > 0 ? speed : 1;
} }
hideNewModeSettlementDecorations() {
const abTests = cc.fx.GameConfig.GM_INFO.abTests;
return this.autoNextAfterNewMode && !!abTests && Number(abTests.layer_one) == 2;
}
setSettlementNodeVisible(node: cc.Node, visible: boolean) {
if (!node) {
return;
}
node.opacity = visible ? 255 : 0;
node.active = visible;
}
playLayerTwoWinCoinFly() { playLayerTwoWinCoinFly() {
if (!this.node || !cc.isValid(this.node)) { if (!this.node || !cc.isValid(this.node)) {
return; return;
} }
if (this.hideNewModeSettlementDecorations()) {
return;
}
const abTests = cc.fx.GameConfig.GM_INFO.abTests; const abTests = cc.fx.GameConfig.GM_INFO.abTests;
if (!abTests || Number(abTests.layer_two) != 2) { if (!abTests || Number(abTests.layer_two) != 2) {
return; return;
@ -6296,7 +6312,8 @@ export default class MapConroler extends cc.Component {
let pian = this.gameOverNode.getChildByName("pian"); let pian = this.gameOverNode.getChildByName("pian");
let guang = this.gameOverNode.getChildByName("guang"); let guang = this.gameOverNode.getChildByName("guang");
let coins4 = this.gameOverNode.getChildByName("coins4"); let coins4 = this.gameOverNode.getChildByName("coins4");
let caidai = this.gameOverNode.getChildByName("caidai");
const hideNewModeDecorations = this.hideNewModeSettlementDecorations();
// 初始化所有元素为隐藏状态 // 初始化所有元素为隐藏状态
@ -6307,14 +6324,22 @@ export default class MapConroler extends cc.Component {
pian.active = false; pian.active = false;
guang.active = false; guang.active = false;
coins4.active = false; coins4.active = false;
caidai.active = false;
if (hideNewModeDecorations) {
this.setSettlementNodeVisible(title, false);
this.setSettlementNodeVisible(pian, false);
this.setSettlementNodeVisible(guang, false);
this.setSettlementNodeVisible(this.gameOverNode.getChildByName("diguan"), false);
}
// 第一步:播放 title - 果冻弹跳效果 // 第一步:播放 title - 果冻弹跳效果
cc.tween(title) cc.tween(title)
.to(0, { scale: 0, position: cc.v3(0, 0, 0) }) .to(0, { scale: 0, position: cc.v3(0, 0, 0) })
.call(() => { .call(() => {
title.active = true; title.active = !hideNewModeDecorations;
title.opacity = hideNewModeDecorations ? 0 : 255;
//播放速度减慢一倍 //播放速度减慢一倍
const anim = title.getChildByName("cai").getComponent(cc.Animation); const anim = title.getChildByName("cai").getComponent(cc.Animation);
anim.defaultClip.speed = 0.5 * speed; anim.defaultClip.speed = 0.5 * speed;
@ -6481,7 +6506,13 @@ export default class MapConroler extends cc.Component {
// 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"); let ruzhi = this.gameOverNode.getChildByName("Ruzhi");
const hideNewModeDecorations = this.hideNewModeSettlementDecorations();
diguan.scaleX = diguan.scaleY = 0.01; diguan.scaleX = diguan.scaleY = 0.01;
if (hideNewModeDecorations) {
this.setSettlementNodeVisible(pian, false);
this.setSettlementNodeVisible(guang, false);
this.setSettlementNodeVisible(diguan, false);
}
// diguan.active = true; // diguan.active = true;
// 无尽关卡 // 无尽关卡
let endlessNode = this.gameOverNode.getChildByName("endlessNode"); let endlessNode = this.gameOverNode.getChildByName("endlessNode");
@ -6489,7 +6520,8 @@ export default class MapConroler extends cc.Component {
if (cc.fx.GameTool.maxLevel() && cc.fx.GameConfig.GM_INFO.GameplayType == 1) { if (cc.fx.GameTool.maxLevel() && cc.fx.GameConfig.GM_INFO.GameplayType == 1) {
endlessNode.active = true; endlessNode.active = true;
} else { } else {
diguan.active = true; diguan.active = !hideNewModeDecorations;
diguan.opacity = hideNewModeDecorations ? 0 : 255;
} }
// caidai 先播放骨骼动画 // caidai 先播放骨骼动画
@ -6511,11 +6543,13 @@ export default class MapConroler extends cc.Component {
.delay(t(0.05)) .delay(t(0.05))
.to(0, { scale: 0 }) .to(0, { scale: 0 })
.call(() => { .call(() => {
pian.active = true; pian.active = !hideNewModeDecorations;
pian.opacity = hideNewModeDecorations ? 0 : 255;
}) })
.to(t(0.3), { scale: 3.6 }) .to(t(0.3), { scale: 3.6 })
.call(() => { .call(() => {
pian.active = false; pian.active = false;
pian.opacity = hideNewModeDecorations ? 0 : 255;
}) })
.start(); .start();
@ -6524,7 +6558,8 @@ export default class MapConroler extends cc.Component {
.delay(t(0.1)) .delay(t(0.1))
.to(0, { scale: 0 }) .to(0, { scale: 0 })
.call(() => { .call(() => {
guang.active = true; guang.active = !hideNewModeDecorations;
guang.opacity = hideNewModeDecorations ? 0 : 255;
}) })
.to(t(0.3), { scale: 1 }) .to(t(0.3), { scale: 1 })
.start(); .start();