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.
22 lines
735 B
22 lines
735 B
import { Singleton } from '../../tools/Singleton';
|
|
import { ThermalGovernor } from 'db://assets/script/game/ThermalGovernor';
|
|
import { PerfReport } from 'db://assets/script/game/PerfReport';
|
|
import { ResourcePhase, getResourcePhase, setResourcePhase } from './ResourcePhase';
|
|
|
|
export { ResourcePhase } from './ResourcePhase';
|
|
|
|
export class ResourcePhaseGate extends Singleton {
|
|
get phase(): ResourcePhase {
|
|
return getResourcePhase();
|
|
}
|
|
|
|
setPhase(phase: ResourcePhase): void {
|
|
setResourcePhase(phase);
|
|
ThermalGovernor.onResourcePhase(phase);
|
|
PerfReport.reportMemSnap(phase);
|
|
}
|
|
|
|
isHallPreloadActive(): boolean {
|
|
return getResourcePhase() === ResourcePhase.HallPreload;
|
|
}
|
|
}
|
|
|