更新动画
This commit is contained in:
parent
9ce1cbeb78
commit
414afc9d3b
|
|
@ -3431,10 +3431,26 @@ export default class MapConroler extends cc.Component {
|
|||
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() {
|
||||
if (!this.node || !cc.isValid(this.node)) {
|
||||
return;
|
||||
}
|
||||
if (this.hideNewModeSettlementDecorations()) {
|
||||
return;
|
||||
}
|
||||
const abTests = cc.fx.GameConfig.GM_INFO.abTests;
|
||||
if (!abTests || Number(abTests.layer_two) != 2) {
|
||||
return;
|
||||
|
|
@ -6296,7 +6312,8 @@ export default class MapConroler extends cc.Component {
|
|||
let pian = this.gameOverNode.getChildByName("pian");
|
||||
let guang = this.gameOverNode.getChildByName("guang");
|
||||
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;
|
||||
guang.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 - 果冻弹跳效果
|
||||
cc.tween(title)
|
||||
.to(0, { scale: 0, position: cc.v3(0, 0, 0) })
|
||||
.call(() => {
|
||||
title.active = true;
|
||||
title.active = !hideNewModeDecorations;
|
||||
title.opacity = hideNewModeDecorations ? 0 : 255;
|
||||
|
||||
//播放速度减慢一倍
|
||||
const anim = title.getChildByName("cai").getComponent(cc.Animation);
|
||||
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("diguan");
|
||||
let ruzhi = this.gameOverNode.getChildByName("Ruzhi");
|
||||
const hideNewModeDecorations = this.hideNewModeSettlementDecorations();
|
||||
diguan.scaleX = diguan.scaleY = 0.01;
|
||||
if (hideNewModeDecorations) {
|
||||
this.setSettlementNodeVisible(pian, false);
|
||||
this.setSettlementNodeVisible(guang, false);
|
||||
this.setSettlementNodeVisible(diguan, false);
|
||||
}
|
||||
// diguan.active = true;
|
||||
// 无尽关卡
|
||||
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) {
|
||||
endlessNode.active = true;
|
||||
} else {
|
||||
diguan.active = true;
|
||||
diguan.active = !hideNewModeDecorations;
|
||||
diguan.opacity = hideNewModeDecorations ? 0 : 255;
|
||||
}
|
||||
|
||||
// caidai 先播放骨骼动画
|
||||
|
|
@ -6511,11 +6543,13 @@ export default class MapConroler extends cc.Component {
|
|||
.delay(t(0.05))
|
||||
.to(0, { scale: 0 })
|
||||
.call(() => {
|
||||
pian.active = true;
|
||||
pian.active = !hideNewModeDecorations;
|
||||
pian.opacity = hideNewModeDecorations ? 0 : 255;
|
||||
})
|
||||
.to(t(0.3), { scale: 3.6 })
|
||||
.call(() => {
|
||||
pian.active = false;
|
||||
pian.opacity = hideNewModeDecorations ? 0 : 255;
|
||||
})
|
||||
.start();
|
||||
|
||||
|
|
@ -6524,7 +6558,8 @@ export default class MapConroler extends cc.Component {
|
|||
.delay(t(0.1))
|
||||
.to(0, { scale: 0 })
|
||||
.call(() => {
|
||||
guang.active = true;
|
||||
guang.active = !hideNewModeDecorations;
|
||||
guang.opacity = hideNewModeDecorations ? 0 : 255;
|
||||
})
|
||||
.to(t(0.3), { scale: 1 })
|
||||
.start();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user