WeaponCell.ts 588 B

12345678910111213141516171819202122232425262728293031
  1. import { _decorator } from 'cc';
  2. import GameConfigManager from '../GameConfigManager';
  3. const { ccclass, property } = _decorator;
  4. /**
  5. * 武器槽
  6. */
  7. export class WeaponCell{
  8. /**
  9. * 格子ID
  10. */
  11. public cellId:number=1;
  12. /**
  13. * 武器ID
  14. */
  15. public weaponId:number=1;
  16. /**
  17. * 上次产出的时间
  18. */
  19. public lastOutputTime:number=0;
  20. /**
  21. * 武器配置
  22. */
  23. public get weaponConfig():any{
  24. if(this.weaponId<0){
  25. return null;
  26. }
  27. return GameConfigManager.GetWeaponConfig(this.weaponId);
  28. }
  29. }