ComAttackable.ts 573 B

12345678910111213141516171819
  1. /** @format */
  2. import {ComType, EntityIndex} from '../lib/Const'
  3. import {ECSComponent} from '../lib/ECSComponent'
  4. @ECSComponent(ComType.ComAttackable)
  5. export class ComAttackable {
  6. public countDown: number // 攻击剩余时间
  7. public dirty: boolean //处于攻击动作的entity
  8. public hurtFrame: number // 攻击
  9. public hurtFrameCompleted: boolean // 攻击完成
  10. public isMelee: boolean // 是否是近战
  11. public curAttack: EntityIndex //当前击打对象
  12. //近战包围数组
  13. public beAttacks: EntityIndex[] = [] //被击打数组
  14. }