You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
558 B
21 lines
558 B
|
3 weeks ago
|
/** 资源生命周期相位(表达「此刻能否预载/释放」) */
|
||
|
|
export enum ResourcePhase {
|
||
|
|
Boot = 'boot',
|
||
|
|
Hall = 'hall',
|
||
|
|
HallPreload = 'hallPreload',
|
||
|
|
Battle = 'battle',
|
||
|
|
BattleExit = 'battleExit',
|
||
|
|
}
|
||
|
|
|
||
|
|
let _currentPhase = ResourcePhase.Boot;
|
||
|
|
|
||
|
|
/** 当前相位(无副作用,供 MemoryDiag 等轻量模块读取) */
|
||
|
|
export function getResourcePhase(): ResourcePhase {
|
||
|
|
return _currentPhase;
|
||
|
|
}
|
||
|
|
|
||
|
|
/** 由 ResourcePhaseGate 写入 */
|
||
|
|
export function setResourcePhase(phase: ResourcePhase): void {
|
||
|
|
_currentPhase = phase;
|
||
|
|
}
|