|
@@ -3,6 +3,7 @@ import { Tablelevels_config } from "../../../module_basic/table/Tablelevels_conf
|
|
|
import { GlobalConfig } from "../../../start/Config/GlobalConfig";
|
|
|
import { sys } from "cc";
|
|
|
import { AliensGlobalInstance } from "../AliensGlobalInstance";
|
|
|
+import { GameUtil } from "../GameUtil";
|
|
|
|
|
|
/**关卡数据模型
|
|
|
*/
|
|
@@ -47,7 +48,9 @@ export class LevelModel {
|
|
|
this.level = 1;
|
|
|
} else {
|
|
|
if (level > GlobalConfig.levelTotal) {
|
|
|
- const randomLevel = this.randomLevelList[Math.floor(Math.random() * this.randomLevelList.length - 1)];
|
|
|
+ let randomLevel = this.randomLevelList[Math.floor(Math.random() * this.randomLevelList.length - 1)];
|
|
|
+ randomLevel = GameUtil.getLastNumber(randomLevel.toString())!;
|
|
|
+ // console.log('超出最大关卡,随机关卡:', randomLevel);
|
|
|
this.level = randomLevel;
|
|
|
} else {
|
|
|
this.level = parseInt(level);
|