Newer
Older
DungeonShooting / DungeonShooting_Godot / src / game / item / weapon / bullet / Bullet.cs
  1. using Godot;
  2.  
  3. /// <summary>
  4. /// 子弹接口
  5. /// </summary>
  6. public interface IBullet
  7. {
  8. /// <summary>
  9. /// 攻击目标阵营
  10. /// </summary>
  11. CampEnum TargetCamp { get; }
  12. /// <summary>
  13. /// 发射该子弹的武器
  14. /// </summary>
  15. Weapon Gun { get; }
  16. /// <summary>
  17. /// 发射该子弹的物体对象
  18. /// </summary>
  19. Node2D Master { get; }
  20. /// <summary>
  21. /// 初始化基础数据
  22. /// </summary>
  23. /// <param name="target">攻击的目标阵营</param>
  24. /// <param name="gun">发射该子弹的枪对象</param>
  25. /// <param name="master">发射该子弹的角色</param>
  26. void Init(CampEnum target, Weapon gun, Node2D master);
  27. }
  28.  
  29.  
  30. public class Bullet : ActivityObject
  31. {
  32. public Bullet(string scenePath) : base(scenePath)
  33. {
  34. }
  35. }