Files
cocos_zhuzhan/assets/scripts/level/LevelIds.ts

19 lines
751 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/** 与 Unity / 主站 config.js BEGINNING_REAL_LVID 一致;首关 91601 */
export const LEVEL_ID_BASE = 91601;
/** 主站合法关卡 ID从 BEGINNING_REAL_LVID91601起 */
export function isGameLevelId(levelID: number): boolean {
return Number.isFinite(levelID) && levelID >= LEVEL_ID_BASE;
}
/**
* 主站练习题批次主题(只覆盖 9160194000
* LA/LB 9160192200 siluLC/LD 9220192800 chineseLE/LF 9280194000 numMan
*/
export function themeForLevelId(levelID: number): string | undefined {
if (levelID >= 91601 && levelID <= 92200) return 'silu';
if (levelID >= 92201 && levelID <= 92800) return 'chinese';
if (levelID >= 92801 && levelID <= 94000) return 'numMan';
return undefined;
}