ComBullet.ts 789 B

12345678910111213141516171819202122232425
  1. /** @format */
  2. import {ComType, EntityIndex} from '../lib/Const'
  3. import {ECSComponent} from '../lib/ECSComponent'
  4. import {cObject} from '../../collision/Object'
  5. import {IBulletConfig} from '../../config/BulletConfig'
  6. import {ComRole} from './ComRole'
  7. import {IFightData} from '../core/GameInterface'
  8. @ECSComponent(ComType.ComBullet)
  9. export class ComBullet {
  10. public bulletCfg: IBulletConfig
  11. //初始赋值,防止预制体创建中人死了创建不出来
  12. public group: number
  13. public cObject: cObject
  14. public hitEnemies: EntityIndex[] = []
  15. public ejectionEnemy: EntityIndex
  16. public ejectionEnemies: EntityIndex[] = []
  17. public ejectionAnis: EntityIndex[] = []
  18. //是否暴击
  19. public isCrit: boolean
  20. //攻击参数对象
  21. fightData: IFightData
  22. }