SingletonModuleComp.ts 755 B

12345678910111213141516171819202122232425
  1. /*
  2. * @Author: dgflash
  3. * @Date: 2021-11-18 14:20:46
  4. * @LastEditors: mojunshou 1637302775@qq.com
  5. * @LastEditTime: 2025-04-10 15:27:08
  6. */
  7. import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
  8. import { Account } from "../account/Account";
  9. import { Game } from "../Game";
  10. import { Initialize } from "../initialize/Initialize";
  11. /** 游戏单例业务模块 */
  12. @ecs.register('SingletonModule')
  13. export class SingletonModuleComp extends ecs.Comp {
  14. /** 游戏初始化模块 */
  15. initialize: Initialize = null!;
  16. /** 游戏账号模块 */
  17. account: Account = null!;
  18. /**游戏数据模块*/
  19. game: Game = null!
  20. reset() { }
  21. }
  22. export var smc: SingletonModuleComp = ecs.getSingleton(SingletonModuleComp);