更新 新 功能前置

This commit is contained in:
COMPUTER\EDY 2026-07-07 14:54:41 +08:00
parent 7f602c19c3
commit 11dd4717ee
24 changed files with 2591 additions and 1775 deletions

File diff suppressed because it is too large Load Diff

View File

@ -483,7 +483,9 @@ export default class GameManager extends cc.Component {
if (data.coinAmount == null || data.coinAmount == undefined) {
data.coinAmount = 0;
}
if (levelInfo.level > data.levelAmount) {
console.log("本地等级 大于服务器等级才走这里")
cc.fx.GameConfig.GM_INFO.level = levelInfo.level;
cc.fx.GameConfig.GM_INFO.coin = coinInfo.coin;
@ -541,7 +543,11 @@ export default class GameManager extends cc.Component {
}
this.load3 = true;
this.load4 = true;
} else {
}
else {
const localLevel = levelInfo.level;
const serverLevelIsNewer = localLevel < data.levelAmount;
// 服务器关卡更高,说明当前设备缓存已落后,资源数据统一以服务器为准。
if (data.levelAmount == null || data.levelAmount == undefined) {
data.levelAmount = cc.fx.GameConfig.GM_INFO.level;
Utils.setUserLevel((data) => {
@ -552,12 +558,13 @@ export default class GameManager extends cc.Component {
cc.fx.GameTool.setUserCoin((data) => {
});
}
const timestamp = Date.now();
let levelInfo = { "level": data.levelAmount, "timestamp": timestamp };
cc.fx.StorageMessage.setStorage("level", levelInfo);
let coinInfo = { "coin": data.coinAmount, "timestamp": timestamp };
cc.fx.StorageMessage.setStorage("coin", coinInfo);
if (data.forcedUpdate == true) {
let levelInfoTemp = { "level": data.levelAmount, "timestamp": timestamp };
cc.fx.StorageMessage.setStorage("level", levelInfoTemp);
let coinInfoTemp = { "coin": data.coinAmount, "timestamp": timestamp };
cc.fx.StorageMessage.setStorage("coin", coinInfoTemp);
if (serverLevelIsNewer || data.forcedUpdate == true) {
let propInfo = {
"freezeAmount": data.freezeAmount,
"hammerAmount": data.hammerAmount,
@ -570,6 +577,9 @@ export default class GameManager extends cc.Component {
cc.fx.GameConfig.GM_INFO.level = data.levelAmount;
cc.fx.GameConfig.GM_INFO.coin = data.coinAmount;
cc.fx.StorageMessage.setStorage("prop", propInfo);
if (serverLevelIsNewer) {
console.log("服务器关卡高于本地,金币和道具已使用服务器数据覆盖本地缓存", localLevel, data.levelAmount);
}
// console.log("走的强制刷新", cc.fx.GameConfig.GM_INFO.hammerAmount)
}
else {

View File

@ -109,6 +109,9 @@ export default class MapConroler extends cc.Component {
@property(cc.SpriteAtlas)
avatar: cc.SpriteAtlas = null;
@property({ tooltip: "点击 NewMode 确认后胜利结算动画倍速1 为原速)" })
newModeSettlementSpeed: number = 1.15;
timeLabel: cc.Node = null;
levelLabel: cc.Node = null;
coin: cc.Node = null;
@ -116,6 +119,7 @@ export default class MapConroler extends cc.Component {
touchIng: boolean = false;//是否在操作方块
new_mode: number = 0;
new_item: number = 0;
autoNextAfterNewMode: boolean = false;
mapWidth: number = 0;
mapHeight: number = 0;
wallNum: number = 0;
@ -3301,6 +3305,10 @@ export default class MapConroler extends cc.Component {
}
});
// addLevel 会同步把已通关数加一,此时即可判断下一关是否有新功能。
// 新功能介绍统一在当前关结算出现时展示,不再等玩家点击“下一关”或“首页”。
this.check_NewMode();
setTimeout(() => {
this.node.parent.parent.getChildByName("Win").active = true;
this.node.parent.parent.getChildByName("Lose").active = false;
@ -3308,20 +3316,12 @@ export default class MapConroler extends cc.Component {
if (cc.fx.GameConfig.GM_INFO.level >= 21) {
this.setPassProgress();
}
if (cc.fx.GameConfig.GM_INFO.addLevel >= 5) {
this.createRank();
}
// else if (cc.fx.GameConfig.GM_INFO.addLevel < 5) {
// this.createCareer();
// }
this.createCareer();
this.Settlement();
if (cc.fx.GameConfig.GM_INFO.level >= 17) {
this.node.parent.parent.getChildByName("Win").getChildByName("WinStreak").active = true;
this.openWinStreak();
}
else {
this.node.parent.parent.getChildByName("Win").getChildByName("WinStreak").active = false;
if (this.new_mode == 3) {
// 新功能介绍出现期间只显示弹窗,胜利结算动画等玩家确认后再播放。
this.gameOverNode.active = false;
this.openNewMode(0);
} else {
this.playWinSettlement();
}
}, 660);
// console.log("游戏成功");
@ -3337,7 +3337,6 @@ export default class MapConroler extends cc.Component {
} else {
console.log("JiaZai 节点未找到");
}
this.check_NewMode();
}
else {
if (this.gameOver == true) {
@ -3361,6 +3360,67 @@ export default class MapConroler extends cc.Component {
}
}
// 播放胜利结算界面的完整内容。普通胜利直接调用,新功能弹窗则延后到确认时调用。
playWinSettlement() {
if (cc.fx.GameConfig.GM_INFO.addLevel >= 5) {
this.createRank();
}
this.createCareer();
this.Settlement();
if (cc.fx.GameConfig.GM_INFO.level >= 17) {
this.node.parent.parent.getChildByName("Win").getChildByName("WinStreak").active = true;
this.openWinStreak();
}
else {
this.node.parent.parent.getChildByName("Win").getChildByName("WinStreak").active = false;
}
}
// 只在 NewMode 的 clickBtn 自动过关流程中加速结算动画。
settlementAnimationTime(duration: number) {
if (!this.autoNextAfterNewMode) {
return duration;
}
const speed = Number(this.newModeSettlementSpeed);
return duration / (speed > 0 ? speed : 1);
}
settlementAnimationSpeed() {
if (!this.autoNextAfterNewMode) {
return 1;
}
const speed = Number(this.newModeSettlementSpeed);
return speed > 0 ? speed : 1;
}
// 新功能介绍确认后播放结算动画,并在指定延迟后自动进入下一关。
onNewModeConfirmed() {
const newModeNode = this.node.parent.parent.getChildByName("NewMode");
newModeNode.off("new-mode-returned", this.onNewModeReturned, this);
this.autoNextAfterNewMode = true;
this.gameOverNode.active = true;
this.playWinSettlement();
const homeBtn = this.gameOverNode.getChildByName("homeBtn");
const nextBtn = this.gameOverNode.getChildByName("nextBtn");
homeBtn.active = false;
nextBtn.active = false;
this.scheduleOnce(() => {
nextBtn.getComponent("btnControl").setTouch(true);
this.winLevel();
}, 1.5);
}
// 点击新功能弹窗的返回按钮后,恢复普通胜利结算流程,不自动进入下一关。
onNewModeReturned() {
const newModeNode = this.node.parent.parent.getChildByName("NewMode");
newModeNode.off("new-mode-confirmed", this.onNewModeConfirmed, this);
this.autoNextAfterNewMode = false;
this.gameOverNode.active = true;
this.playWinSettlement();
}
//关闭最大关卡提示窗
winMaxLevelShowClose() {
this.node.parent.parent.getChildByName("Win").getChildByName("specialTips").active = false;
@ -3467,12 +3527,6 @@ export default class MapConroler extends cc.Component {
}
else {
// console.log("下一关");
if (this.new_mode == 3) {
this.node.parent.parent.getChildByName("Win").active = false;
this.openNewMode(2);
cc.fx.GameConfig.LEVEL_INFO_init(false, 0, false);
return;
}
if (this.new_item == 3) {
if (cc.fx.GameConfig.GM_INFO.level + 1 == 8) {
console.log("新手引导开启");
@ -4113,11 +4167,6 @@ export default class MapConroler extends cc.Component {
cc.fx.GameTool.setWinStreak("fail");
MapConroler._instance.trackFinishi("give_up", "customEventData");
}
if (this.new_mode == 3) {
this.node.parent.parent.getChildByName("Win").active = false;
this.openNewMode(1);
return;
}
if (this.new_item == 3) {
if (cc.fx.GameConfig.GM_INFO.level + 1 == 8) {
cc.fx.GameConfig.GM_INFO.hammerFirst = true;
@ -4391,14 +4440,19 @@ export default class MapConroler extends cc.Component {
};
// 开始分帧销毁方块
destroyBlocks();
this.node.parent.parent.getChildByName("NewMode").active = true;
let pauseNode = this.node.parent.parent.getChildByName("NewMode").getChildByName("newmode");
const newModeNode = this.node.parent.parent.getChildByName("NewMode");
if (type == 0) {
newModeNode.once("new-mode-confirmed", this.onNewModeConfirmed, this);
newModeNode.once("new-mode-returned", this.onNewModeReturned, this);
}
newModeNode.active = true;
let pauseNode = newModeNode.getChildByName("newmode");
pauseNode.scale = 0.3;
cc.tween(pauseNode)
.to(0.2, { scale: 1.05 }, { easing: 'backOut' })
.to(0.15, { scale: 1.0 }, { easing: 'sineOut' })
.start();
this.node.parent.parent.getChildByName("NewMode").getComponent("NewMode").setMode(type);
newModeNode.getComponent("NewMode").setMode(type);
}
//正在点击方块颜色,对应颜色门下降
@ -5974,6 +6028,7 @@ export default class MapConroler extends cc.Component {
// 展示连胜界面动画
openWinStreak() {
const t = (duration: number) => this.settlementAnimationTime(duration);
let winStreak = this.node.parent.parent.getChildByName("Win").getChildByName("WinStreak");
winStreak.getChildByName("open").active = false;
if (cc.fx.GameConfig.GM_INFO.winStreak > 0) {
@ -5990,14 +6045,14 @@ export default class MapConroler extends cc.Component {
else {
hammer[i].scaleX = hammer[i].scaleY = 0;
cc.tween(hammer[i])
.delay(0.2)
.to(0.2, { scaleX: 0.7, scaleY: 0.7 }) // 快速放大到0.7
.to(0.1, { scaleX: 0.4, scaleY: 0.4 }) // 突然缩小制造弹性感
.to(0.1, { scaleX: 0.6, scaleY: 0.6 }) // 再次弹起到0.6
.to(0.1, { scaleX: 0.5, scaleY: 0.5 }) // 最终稳定到0.5
.to(0.05, { scaleX: 0.55, scaleY: 0.45 }) // X轴抖动效果
.to(0.05, { scaleX: 0.45, scaleY: 0.55 }) // Y轴抖动效果
.to(0.1, { scaleX: 0.5, scaleY: 0.5 }) // 恢复最终比例
.delay(t(0.2))
.to(t(0.2), { scaleX: 0.7, scaleY: 0.7 }) // 快速放大到0.7
.to(t(0.1), { scaleX: 0.4, scaleY: 0.4 }) // 突然缩小制造弹性感
.to(t(0.1), { scaleX: 0.6, scaleY: 0.6 }) // 再次弹起到0.6
.to(t(0.1), { scaleX: 0.5, scaleY: 0.5 }) // 最终稳定到0.5
.to(t(0.05), { scaleX: 0.55, scaleY: 0.45 }) // X轴抖动效果
.to(t(0.05), { scaleX: 0.45, scaleY: 0.55 }) // Y轴抖动效果
.to(t(0.1), { scaleX: 0.5, scaleY: 0.5 }) // 恢复最终比例
.start();
}
}
@ -6008,6 +6063,7 @@ export default class MapConroler extends cc.Component {
//创建 入职界面
createCareer() {
const t = (duration: number) => this.settlementAnimationTime(duration);
let max = false;
if (cc.fx.GameConfig.GM_INFO.addLevel == 4) {
let address = cc.fx.StorageMessage.getStorage("address");
@ -6038,7 +6094,7 @@ export default class MapConroler extends cc.Component {
NumberToImage.numberToImageNodes4(addLevel, 43, 15, "custom", Career.getChildByName("level"), true);
if (addLevel == 1) {
cc.tween(progress.children[4].getChildByName("win").getComponent(cc.Sprite))
.to(0.5, { fillRange: 1 })
.to(t(0.5), { fillRange: 1 })
.start();
} else if (addLevel > 1) {
for (let i = 0; i < 4; i++) {
@ -6054,26 +6110,26 @@ export default class MapConroler extends cc.Component {
else {
progress.children[i].getChildByName("progress").width = 0;
cc.tween(progress.children[i].getChildByName("progress"))
.delay(0.4)
.to(0.3, { width: 100 })
.delay(t(0.4))
.to(t(0.3), { width: 100 })
.start();
}
if (i < 3) {
progress.children[i + 4].getChildByName("win").getComponent(cc.Sprite).fillRange = 1;
cc.tween(progress.children[i + 5].getChildByName("win").getComponent(cc.Sprite))
.delay(0.7)
.to(0.5, { fillRange: 1 })
.delay(t(0.7))
.to(t(0.5), { fillRange: 1 })
.start();
}
else {
progress.children[i + 4].getChildByName("win").getComponent(cc.Sprite).fillRange = 1;
cc.tween(Career.getChildByName("ruzhi"))
.delay(0.7)
.to(0.1, { rotation: 10 })
.to(0.2, { rotation: -10 })
.to(0.2, { rotation: 10 })
.to(0.1, { rotation: 0 })
.delay(t(0.7))
.to(t(0.1), { rotation: 10 })
.to(t(0.2), { rotation: -10 })
.to(t(0.2), { rotation: 10 })
.to(t(0.1), { rotation: 0 })
.start();
}
@ -6113,6 +6169,8 @@ export default class MapConroler extends cc.Component {
//结算界面
Settlement() {
const t = (duration: number) => this.settlementAnimationTime(duration);
const speed = this.settlementAnimationSpeed();
cc.fx.AudioManager._instance.playEffect("win", null)
//获取this.gameOverNode所有子节点的位置
let child = this.gameOverNode;
@ -6150,7 +6208,7 @@ export default class MapConroler extends cc.Component {
title.active = true;
//播放速度减慢一倍
const anim = title.getChildByName("cai").getComponent(cc.Animation);
anim.defaultClip.speed = 0.5; // 全局默认速度
anim.defaultClip.speed = 0.5 * speed;
anim.play(); // 开始播放
let iphone = cc.fx.GameConfig.GM_INFO.useravatarIcon.substring(0, 4);
// console.log("头像_________", cc.fx.GameConfig.GM_INFO.useravatarIcon, cc.fx.GameConfig.GM_INFO.useravatar);
@ -6164,12 +6222,12 @@ export default class MapConroler extends cc.Component {
// this.icon.getComponent(cc.Sprite).spriteFrame = icon;
}
})
.to(0.12, { scale: 1.2 }, { easing: 'quadOut' })
.to(0.08, { scale: 0.85 }, { easing: 'quadIn' })
.to(0.06, { scale: 1.1 }, { easing: 'quadOut' })
.to(0.04, { scale: 1 }, { easing: 'quadIn' })
.delay(0.1)
.to(0.4, { x: this.arr[0][0], y: this.arr[0][1], z: this.arr[0][2] })
.to(t(0.12), { scale: 1.2 }, { easing: 'quadOut' })
.to(t(0.08), { scale: 0.85 }, { easing: 'quadIn' })
.to(t(0.06), { scale: 1.1 }, { easing: 'quadOut' })
.to(t(0.04), { scale: 1 }, { easing: 'quadIn' })
.delay(t(0.1))
.to(t(0.4), { x: this.arr[0][0], y: this.arr[0][1], z: this.arr[0][2] })
.call(() => {
this.playButtonGroup();
})
@ -6178,6 +6236,7 @@ export default class MapConroler extends cc.Component {
// 播放按钮组动画
playButtonGroup() {
const t = (duration: number) => this.settlementAnimationTime(duration);
let homeBtn = this.gameOverNode.getChildByName("homeBtn");
let nextBtn = this.gameOverNode.getChildByName("nextBtn");
let tiaodik = this.gameOverNode.getChildByName("tiaodik");
@ -6188,45 +6247,49 @@ export default class MapConroler extends cc.Component {
cc.tween(homeBtn)
// .to(0, { position: cc.v3(0, -680, 0), scale: 0 })
.call(() => {
homeBtn.active = true;
if (!this.autoNextAfterNewMode) {
homeBtn.active = true;
}
})
.to(0.15, { scale: 1.25 }, { easing: 'backOut' })
.to(0.08, { scale: 0.9 }, { easing: 'quadIn' })
.to(0.06, { scale: 1.15 }, { easing: 'quadOut' })
.to(0.04, { scale: 1 }, { easing: 'quadIn' })
.to(t(0.15), { scale: 1.25 }, { easing: 'backOut' })
.to(t(0.08), { scale: 0.9 }, { easing: 'quadIn' })
.to(t(0.06), { scale: 1.15 }, { easing: 'quadOut' })
.to(t(0.04), { scale: 1 }, { easing: 'quadIn' })
// .to(0.3 / 2, { position: cc.v3(this.arr[6][0], this.arr[6][1], this.arr[6][2]) })
.start();
cc.tween(nextBtn)
.delay(0.1)
.delay(t(0.1))
//.to(0, { position: cc.v3(0, -880, 0), scale: 0 })
.call(() => {
if (cc.fx.GameConfig.GM_INFO.otherLevel == 0) {
nextBtn.active = true;
if (!this.autoNextAfterNewMode) {
nextBtn.active = true;
}
}
else {
cc.fx.GameConfig.GM_INFO.otherLevel = 0;
cc.fx.GameConfig.GM_INFO.otherUid = "";
}
})
.to(0.15, { scale: 1.25 }, { easing: 'backOut' })
.to(0.08, { scale: 0.9 }, { easing: 'quadIn' })
.to(0.06, { scale: 1.15 }, { easing: 'quadOut' })
.to(0.04, { scale: 1 }, { easing: 'quadIn' })
.to(t(0.15), { scale: 1.25 }, { easing: 'backOut' })
.to(t(0.08), { scale: 0.9 }, { easing: 'quadIn' })
.to(t(0.06), { scale: 1.15 }, { easing: 'quadOut' })
.to(t(0.04), { scale: 1 }, { easing: 'quadIn' })
// .to(0.3 / 2, { position: cc.v3(this.arr[5][0], this.arr[5][1], this.arr[5][2]) })
.start();
// tiaodik 动画(再延迟一点
cc.tween(tiaodik)
.delay(0.2)
.delay(t(0.2))
// .to(0, { position: cc.v3(0, -1080, 0), scale: 0 })
.call(() => {
tiaodik.active = true;
})
.to(0.15, { scale: 1.25 }, { easing: 'backOut' })
.to(0.08, { scale: 0.9 }, { easing: 'quadIn' })
.to(0.06, { scale: 1.15 }, { easing: 'quadOut' })
.to(0.04, { scale: 1 }, { easing: 'quadIn' })
.to(t(0.15), { scale: 1.25 }, { easing: 'backOut' })
.to(t(0.08), { scale: 0.9 }, { easing: 'quadIn' })
.to(t(0.06), { scale: 1.15 }, { easing: 'quadOut' })
.to(t(0.04), { scale: 1 }, { easing: 'quadIn' })
// .to(0.3 / 2, { position: cc.v3(this.arr[4][0], this.arr[4][1], this.arr[4][2]) })
.call(() => {
this.playDecorationGroup();
@ -6256,7 +6319,7 @@ export default class MapConroler extends cc.Component {
}
if (cc.fx.GameConfig.GM_INFO.addLevel == 5) {
cc.tween(ruzhi)
.delay(1)
.delay(t(1))
.call(() => {
ruzhi.active = true;
if (iphone == "icon") {
@ -6269,22 +6332,22 @@ export default class MapConroler extends cc.Component {
}
cc.tween(ruzhi.getChildByName("bg"))
.to(0.3, { rotation: -5, scaleX: 1, scaleY: 1 })
.to(t(0.3), { rotation: -5, scaleX: 1, scaleY: 1 })
.start();
cc.tween(ruzhi.getChildByName("caidai1"))
.delay(0.6)
.to(0.2, { scaleX: 1, scaleY: 1 })
.delay(t(0.6))
.to(t(0.2), { scaleX: 1, scaleY: 1 })
.start();
cc.tween(ruzhi.getChildByName("caidai2"))
.delay(0.6)
.to(0.2, { scaleX: 1, scaleY: 1 })
.delay(t(0.6))
.to(t(0.2), { scaleX: 1, scaleY: 1 })
.start();
cc.tween(ruzhi.getChildByName("yinzhang"))
.delay(0.5)
.delay(t(0.5))
.call(() => {
ruzhi.getChildByName("yinzhang").active = true;
})
.to(0.2, { scaleX: 1, scaleY: 1 })
.to(t(0.2), { scaleX: 1, scaleY: 1 })
.call(() => {
ruzhi.getChildByName("line").active = true;
ruzhi.getChildByName("line").runAction(cc.rotateTo(50, 1080).repeatForever());
@ -6300,6 +6363,8 @@ export default class MapConroler extends cc.Component {
// 播放装饰元素动画
playDecorationGroup() {
const t = (duration: number) => this.settlementAnimationTime(duration);
const speed = this.settlementAnimationSpeed();
let pian = this.gameOverNode.getChildByName("pian");
let guang = this.gameOverNode.getChildByName("guang");
let coins4 = this.gameOverNode.getChildByName("coins4");
@ -6323,8 +6388,10 @@ export default class MapConroler extends cc.Component {
.to(0, { scale: 2 })
.call(() => {
caidai.active = true;
caidai.getComponent(sp.Skeleton).setAnimation(0, "animation", false);
caidai.getComponent(sp.Skeleton).setCompleteListener(() => {
const caidaiSkeleton = caidai.getComponent(sp.Skeleton);
caidaiSkeleton.timeScale = speed;
caidaiSkeleton.setAnimation(0, "animation", false);
caidaiSkeleton.setCompleteListener(() => {
caidai.active = false;
});
})
@ -6332,12 +6399,12 @@ export default class MapConroler extends cc.Component {
// pian 动画(稍微延迟
cc.tween(pian)
.delay(0.05)
.delay(t(0.05))
.to(0, { scale: 0 })
.call(() => {
pian.active = true;
})
.to(0.3, { scale: 3.6 })
.to(t(0.3), { scale: 3.6 })
.call(() => {
pian.active = false;
})
@ -6345,43 +6412,43 @@ export default class MapConroler extends cc.Component {
// guang 动画(再延迟一点)
cc.tween(guang)
.delay(0.1)
.delay(t(0.1))
.to(0, { scale: 0 })
.call(() => {
guang.active = true;
})
.to(0.3, { scale: 1 })
.to(t(0.3), { scale: 1 })
.start();
// coins4 动画(最后播放)
cc.tween(coins4)
.delay(0.15)
.delay(t(0.15))
.to(0, { scale: 0 })
.call(() => {
coins4.active = true;
})
.to(0.2, { scale: 2.2 }, { easing: 'backOut' })
.to(0.12, { scale: 1.8 }, { easing: 'quadIn' })
.to(0.08, { scale: 2.1 }, { easing: 'quadOut' })
.to(0.06, { scale: 2 }, { easing: 'quadIn' })
.to(t(0.2), { scale: 2.2 }, { easing: 'backOut' })
.to(t(0.12), { scale: 1.8 }, { easing: 'quadIn' })
.to(t(0.08), { scale: 2.1 }, { easing: 'quadOut' })
.to(t(0.06), { scale: 2 }, { easing: 'quadIn' })
.start();
// diguan 动画
cc.tween(diguan)
.delay(0.3)
.to(0.15, { scale: 1.15 }, { easing: 'backOut' })
.to(0.08, { scale: 0.9 }, { easing: 'quadIn' })
.to(0.06, { scale: 1.05 }, { easing: 'quadOut' })
.to(0.04, { scale: 1 }, { easing: 'quadIn' })
.delay(t(0.3))
.to(t(0.15), { scale: 1.15 }, { easing: 'backOut' })
.to(t(0.08), { scale: 0.9 }, { easing: 'quadIn' })
.to(t(0.06), { scale: 1.05 }, { easing: 'quadOut' })
.to(t(0.04), { scale: 1 }, { easing: 'quadIn' })
.start();
cc.tween(endlessNode)
.delay(0.3)
.to(0.15, { scale: 1.15 }, { easing: 'backOut' })
.to(0.08, { scale: 0.9 }, { easing: 'quadIn' })
.to(0.06, { scale: 1.05 }, { easing: 'quadOut' })
.to(0.04, { scale: 1 }, { easing: 'quadIn' })
.delay(t(0.3))
.to(t(0.15), { scale: 1.15 }, { easing: 'backOut' })
.to(t(0.08), { scale: 0.9 }, { easing: 'quadIn' })
.to(t(0.06), { scale: 1.05 }, { easing: 'quadOut' })
.to(t(0.04), { scale: 1 }, { easing: 'quadIn' })
.start();
}

View File

@ -32,14 +32,14 @@ export default class NewClass extends cc.Component {
this.propName = cc.fx.GameConfig.NEW_LEVEL[i].name;
const path = 'Window_Prop/' + this.propName;
if (i == 6 || (i < 11 && i > 7))
this.node.getChildByName("newmode").getChildByName("icon").y = 155
this.node.getChildByName("newmode").getChildByName("icon").y = 155 - 230
else
this.node.getChildByName("newmode").getChildByName("icon").y = 100
this.node.getChildByName("newmode").getChildByName("icon").y = 100 - 230
if (i > 10)
this.node.getChildByName("newmode").getChildByName("light").y = 140
this.node.getChildByName("newmode").getChildByName("light").y = 140 - 230
else
this.node.getChildByName("newmode").getChildByName("light").y = -72
this.node.getChildByName("newmode").getChildByName("light").y = -72 - 230
cc.resources.load(path, cc.SpriteFrame, (err, spriteFrame: cc.SpriteFrame) => {
@ -56,6 +56,10 @@ export default class NewClass extends cc.Component {
setMode(mode: number) {
this.btnStatic = mode;
// mode 0 表示从结算界面自动弹出,关闭后仍停留在结算界面。
if (mode == 0) {
return;
}
let name = "GameScene";
if (mode == 1) {
name = "HomeScene";
@ -67,7 +71,11 @@ export default class NewClass extends cc.Component {
clickBtn() {
cc.fx.AudioManager._instance.playEffect("anniu_Big", null);
if (this.btnStatic == 1) {
if (this.btnStatic == 0) {
this.node.active = false;
this.node.emit("new-mode-confirmed");
}
else if (this.btnStatic == 1) {
cc.fx.GameTool.getUserAvatar(() => {
})
cc.director.loadScene("HomeScene");
@ -77,5 +85,11 @@ export default class NewClass extends cc.Component {
}
}
returnBtn() {
cc.fx.AudioManager._instance.playEffect("anniu_Big", null);
this.node.active = false;
this.node.emit("new-mode-returned");
}
// update (dt) {}
}

View File

@ -170,7 +170,6 @@ export default class NewClass extends cc.Component {
// let rewardData = [
// { type: "coin", count: 6000 },
// ]
}
}, outTradeNo)
// update (dt) {}
@ -491,7 +490,7 @@ export default class NewClass extends cc.Component {
this.iosPrice = price;
this.iosProductId = productId;
this.iosCount = 1;
console.log("准备跳客服回话:");
console.log("准备跳客服回话:", iosPayInfo);
console.log(this.iosProductId);
Utils.GoKEFu(iosPayInfo, (res) => {
if (res == "success") {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 112 KiB

View File

@ -8,8 +8,8 @@
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 991,
"height": 1463,
"width": 1018,
"height": 1526,
"platformSettings": {},
"subMetas": {
"ban": {
@ -21,13 +21,13 @@
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -0.5,
"offsetY": 0,
"trimX": 0,
"trimY": 1,
"width": 991,
"height": 1462,
"rawWidth": 991,
"rawHeight": 1463,
"trimY": 0,
"width": 1018,
"height": 1526,
"rawWidth": 1018,
"rawHeight": 1526,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -1,6 +1,6 @@
{
"ver": "2.3.7",
"uuid": "1a59640c-49b4-4e4c-b1ad-3fece900bc6b",
"uuid": "a4e80994-425a-401c-a0cc-8f18c6362acb",
"importer": "texture",
"type": "sprite",
"wrapMode": "clamp",
@ -8,26 +8,26 @@
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 733,
"height": 690,
"width": 892,
"height": 1223,
"platformSettings": {},
"subMetas": {
"daoju5 (1)": {
"diban": {
"ver": "1.0.6",
"uuid": "a7f944d1-2a78-444b-875a-d7b9ae1fef6a",
"uuid": "9d8027fd-589c-4679-aca0-76f76c6460f1",
"importer": "sprite-frame",
"rawTextureUuid": "1a59640c-49b4-4e4c-b1ad-3fece900bc6b",
"rawTextureUuid": "a4e80994-425a-401c-a0cc-8f18c6362acb",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 1.5,
"trimX": 19,
"trimY": 21,
"width": 695,
"height": 645,
"rawWidth": 733,
"rawHeight": 690,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 892,
"height": 1223,
"rawWidth": 892,
"rawHeight": 1223,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@ -0,0 +1,38 @@
{
"ver": "2.3.7",
"uuid": "4ddb4a19-f42b-4d8c-ad22-2982ab5ce2f5",
"importer": "texture",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 261,
"height": 64,
"platformSettings": {},
"subMetas": {
"jujue": {
"ver": "1.0.6",
"uuid": "dbdc0748-472f-4cb3-b8ae-c46437f02fcc",
"importer": "sprite-frame",
"rawTextureUuid": "4ddb4a19-f42b-4d8c-ad22-2982ab5ce2f5",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 261,
"height": 64,
"rawWidth": 261,
"rawHeight": 64,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,38 @@
{
"ver": "2.3.7",
"uuid": "4392b41d-a9b2-4e35-a2c4-54e6c899acbf",
"importer": "texture",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 393,
"height": 123,
"platformSettings": {},
"subMetas": {
"jujueBtn": {
"ver": "1.0.6",
"uuid": "4b385489-c31c-4609-82ae-ce400f6bda34",
"importer": "sprite-frame",
"rawTextureUuid": "4392b41d-a9b2-4e35-a2c4-54e6c899acbf",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 393,
"height": 123,
"rawWidth": 393,
"rawHeight": 123,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -0,0 +1,38 @@
{
"ver": "2.3.7",
"uuid": "bd776300-e4ea-4a5b-8d2c-56782dbd7665",
"importer": "texture",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 235,
"height": 213,
"platformSettings": {},
"subMetas": {
"newIcon": {
"ver": "1.0.6",
"uuid": "2777abbc-e4a4-4fbc-b684-209c262f58fe",
"importer": "sprite-frame",
"rawTextureUuid": "bd776300-e4ea-4a5b-8d2c-56782dbd7665",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 235,
"height": 213,
"rawWidth": 235,
"rawHeight": 213,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -24,10 +24,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 235,
"height": 79,
"rawWidth": 235,
"rawHeight": 79,
"width": 542,
"height": 132,
"rawWidth": 542,
"rawHeight": 132,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

@ -8,8 +8,8 @@
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 687,
"height": 149,
"width": 637,
"height": 137,
"platformSettings": {},
"subMetas": {
"title": {
@ -20,14 +20,14 @@
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -0.5,
"offsetY": -0.5,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 1,
"width": 686,
"height": 148,
"rawWidth": 687,
"rawHeight": 149,
"trimY": 0,
"width": 637,
"height": 137,
"rawWidth": 637,
"rawHeight": 137,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

View File

@ -0,0 +1,38 @@
{
"ver": "2.3.7",
"uuid": "0b5e08fa-0747-47ff-ac17-5b512de7cc77",
"importer": "texture",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 800,
"height": 150,
"platformSettings": {},
"subMetas": {
"xinLog": {
"ver": "1.0.6",
"uuid": "ecccc889-da4b-40ce-842d-3a2796b875d4",
"importer": "sprite-frame",
"rawTextureUuid": "0b5e08fa-0747-47ff-ac17-5b512de7cc77",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 800,
"height": 150,
"rawWidth": 800,
"rawHeight": 150,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}

View File

@ -878,7 +878,7 @@ export default class NewClass extends cc.Component {
this.iosPrice = price;
this.iosProductId = productId;
this.iosCount = 1;
console.log("准备跳客服回话:");
console.log("准备跳客服回话:", iosPayInfo);
console.log(this.iosProductId);
Utils.GoKEFu(iosPayInfo, (res) => {
if (res == "success") {

View File

@ -1,5 +1,5 @@
{
"last-module-event-record-time": 1782785050691,
"last-module-event-record-time": 1783394460369,
"group-list": [
"default",
"Map"