12345678910111213141516171819202122232425262728293031 |
- import Func from '@/Engine/ECS/Function';
- import SysPage from '@/Frameworks/SysPage';
- import { STORAGE_TYPE, LocalService } from '@/Frameworks/SysStorage';
- import { PAGE_KEY } from '@/Project/constants';
- import { FuncMainState } from '../FuncMain';
- export enum FuncDataMeterState {
- idle,
- }
- export default class FuncDataMeter extends Func<FuncDataMeterState> {
- constructor(name: string) {
- super(name);
- super.initStates((sm) => {
- sm.addState(
- FuncDataMeterState.idle,
- this.onIdleStateIn,
- null,
- this.onIdleStateExit,
- );
- });
- }
- onIdleStateIn(): void {
- SysPage.add(PAGE_KEY.DataMeter, {
- subModule: 2,
- });
- }
- onIdleStateExit(): void {
- SysPage.removeByKey(PAGE_KEY.DataMeter);
- }
- }
|