import Func from '@/Engine/ECS/Function';
import SysPage from '@/Frameworks/SysPage';
import { PAGE_KEY } from '@/Project/constants';
export enum FuncMapState {
  Map,
}

export default class FuncMap extends Func<FuncMapState> {
  constructor(name: string) {
    super(name);
    super.initStates((sm) => {
      sm.addState(FuncMapState.Map, this.onStateIn, null, this.onStateExit);
    });
  }
  onStateIn(): void {
    SysPage.add(PAGE_KEY.Map);
  }
  onStateExit(): void {
    SysPage.removeByKey(PAGE_KEY.Map);
  }
}
