import { DCManager } from "./models/DCManager"
import { LevelManager } from "./models/LevelManager"
import { ResourceManager } from "./models/ResourceManager"
import { StorageManager } from "./models/StorageManager"

const { regClass } = Laya

@regClass()
export class Main extends Laya.Script {
  onAwake() {
    console.log("Game onAwake")
    DCManager.getInstance().init()
    LevelManager.getInstance().init()
    StorageManager.getInstance().init()
    ResourceManager.getInstance().init()
  }

  onLateUpdate(): void {
    StorageManager.getInstance().saveUser()
    StorageManager.getInstance().saveStage()
  }
}
