AccountModelComp.ts 906 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * @Author: dgflash
  3. * @Date: 2021-11-12 10:02:31
  4. * @LastEditors: mojunshou 1637302775@qq.com
  5. * @LastEditTime: 2025-04-01 18:49:12
  6. */
  7. import { ecs } from "../../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
  8. /**
  9. * 游戏账号数据
  10. */
  11. @ecs.register('AccountModel')
  12. export class AccountModelComp extends ecs.Comp {
  13. /** 账号名 */
  14. AccountName: string = null!;
  15. /**玩家UID */
  16. Uid: number = -1;
  17. /**玩家头像*/
  18. HeadUrl: string = null!
  19. /**当前关卡--默认从0开始*/
  20. CurLevel: number = 0;
  21. /**游戏币*/
  22. GameCoin: number = 0;
  23. /**红包币*/
  24. CashCoin: number = 0;
  25. /**协议类型 1隐私 2用户*/
  26. ProtocolType: number = 1;
  27. reset() {
  28. this.AccountName = null!;
  29. this.Uid = -1;
  30. this.HeadUrl = null!;
  31. this.CurLevel = 0;
  32. this.GameCoin = 0;
  33. this.CashCoin = 0;
  34. }
  35. }