调整十连胜彩虹功能参数
This commit is contained in:
@@ -439,7 +439,13 @@ export default class GameManager extends cc.Component {
|
||||
this.checkDailyQuests();
|
||||
// console.log("服务器强制刷新状态__________", data.data.forcedUpdate);
|
||||
//如果有连胜记录,就赋值
|
||||
if (data.data.winStreak !== undefined && data.data.winStreak !== null) {
|
||||
if (cc.fx.GameConfig.forceRainbowWinStreakB) {
|
||||
cc.fx.GameConfig.GM_INFO.winStreak = 10;
|
||||
cc.fx.GameConfig.GM_INFO.winState = true;
|
||||
cc.fx.StorageMessage.setStorage("winStreak", 10);
|
||||
cc.fx.StorageMessage.setStorage("winState", true);
|
||||
}
|
||||
else if (data.data.winStreak !== undefined && data.data.winStreak !== null) {
|
||||
// console.log("从服务器得到连胜", data.data.winStreak);
|
||||
cc.fx.GameConfig.GM_INFO.winStreak = parseInt(data.data.winStreak);
|
||||
let winState = cc.fx.StorageMessage.getStorage("winState");
|
||||
|
||||
@@ -1036,7 +1036,7 @@ export default class MapConroler extends cc.Component {
|
||||
"win_streak": cc.fx.GameConfig.GM_INFO.winStreak,
|
||||
}
|
||||
if (cc.fx.GameConfig.GM_INFO.winStreak >= 10 && cc.fx.GameConfig.GM_INFO.otherLevel == 0) {
|
||||
cc.fx.GameConfig.GM_INFO.winState = false;
|
||||
cc.fx.GameConfig.GM_INFO.winState = cc.fx.GameConfig.forceRainbowWinStreakB;
|
||||
cc.fx.StorageMessage.setStorage("winState", cc.fx.GameConfig.GM_INFO.winState);
|
||||
}
|
||||
cc.fx.GameTool.shushu_Track("enter_stage", data);
|
||||
|
||||
@@ -2,7 +2,7 @@ export const RAINBOW_COLOR = 100;
|
||||
export const RAINBOW_CAPACITY = 30;
|
||||
export const RAINBOW_CELL_ENERGY = 3;
|
||||
// 临时放慢飞行以便测试;飞行结束后才裁切方块,正式时长为 0.3 秒。
|
||||
export const RAINBOW_CAST_SECONDS = 1.5;
|
||||
export const RAINBOW_CAST_SECONDS = 1;
|
||||
|
||||
export interface RainbowCell { x: number; y: number; }
|
||||
export interface RainbowCut {
|
||||
|
||||
@@ -431,7 +431,7 @@ export class GameConfig {
|
||||
return levels[feature];
|
||||
}
|
||||
|
||||
// 临时测试彩虹十连胜 B 方案;改为 false 后恢复真实 AB 分组。
|
||||
// 临时测试:强制彩虹 B 方案,输赢、退出均保持十连胜;false 恢复真实 AB 和正常连胜规则。
|
||||
static forceRainbowWinStreakB = true;
|
||||
|
||||
static isRainbowWinStreak(): boolean {
|
||||
|
||||
@@ -1986,6 +1986,13 @@ var GameTool = {
|
||||
},
|
||||
|
||||
setWinStreak(type) {
|
||||
if (cc.fx.GameConfig.forceRainbowWinStreakB) {
|
||||
cc.fx.GameConfig.GM_INFO.winStreak = 10;
|
||||
cc.fx.GameConfig.GM_INFO.winState = true;
|
||||
cc.fx.StorageMessage.setStorage("winStreak", 10);
|
||||
cc.fx.StorageMessage.setStorage("winState", true);
|
||||
return;
|
||||
}
|
||||
if (type == "sucess") {
|
||||
if (cc.fx.GameConfig.GM_INFO.winStreak <= 10) {
|
||||
cc.fx.GameConfig.GM_INFO.winStreak += 1;
|
||||
|
||||
Reference in New Issue
Block a user