Newer
Older
DungeonShooting / DungeonShooting_Godot / src / game / activity / bullet / normal / IBullet.cs
@小李xl 小李xl on 13 Nov 2023 705 bytes 发射子弹函数抽成一个静态类
  1.  
  2. using System;
  3. using Config;
  4.  
  5. public interface IBullet : ICoroutine, IPoolItem
  6. {
  7. /// <summary>
  8. /// 当物体被回收时的事件
  9. /// </summary>
  10. event Action OnReclaimEvent;
  11. /// <summary>
  12. /// 离开对象池时的事件
  13. /// </summary>
  14. event Action OnLeavePoolEvent;
  15.  
  16. /// <summary>
  17. /// 攻击的层级
  18. /// </summary>
  19. uint AttackLayer { get; set; }
  20. /// <summary>
  21. /// 子弹数据
  22. /// </summary>
  23. BulletData BulletData { get; }
  24. /// <summary>
  25. /// 初始化子弹数据
  26. /// </summary>
  27. void InitData(BulletData data, uint attackLayer);
  28. /// <summary>
  29. /// 执行子弹回收操作
  30. /// </summary>
  31. void DoReclaim();
  32. }