You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

Prop.cs 3.1 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. using Preparation.Interface;
  2. using Preparation.Utility;
  3. namespace GameClass.GameObj
  4. {
  5. public abstract class Prop : ObjOfCharacter
  6. {
  7. protected bool laid = false;
  8. public bool Laid => laid; // 道具是否放置在地图上
  9. public override bool IsRigid => true;
  10. protected override bool IgnoreCollideExecutor(IGameObj targetObj)
  11. {
  12. if (targetObj.Type == GameObjType.Prop || targetObj.Type == GameObjType.Bullet || targetObj.Type == GameObjType.Character)
  13. return true;
  14. return false;
  15. }
  16. public override ShapeType Shape => ShapeType.Square;
  17. public abstract PropType GetPropType();
  18. public Prop(XY initPos, int radius = GameData.PropRadius) :
  19. base(initPos, radius, PlaceType.Null, GameObjType.Prop)
  20. {
  21. this.CanMove = false;
  22. this.moveSpeed = GameData.PropMoveSpeed;
  23. }
  24. public void SetNewPos(XY pos)
  25. {
  26. this.Position = pos;
  27. }
  28. }
  29. ///// <summary>
  30. ///// 坑人地雷
  31. ///// </summary>
  32. // public abstract class DebuffMine : Prop
  33. //{
  34. // public DebuffMine(XYPosition initPos) : base(initPos) { }
  35. // }
  36. #region 所有增益道具
  37. /// <summary>
  38. /// 增加速度
  39. /// </summary>
  40. public sealed class AddSpeed : Prop
  41. {
  42. public AddSpeed(XY initPos) :
  43. base(initPos)
  44. {
  45. }
  46. public override PropType GetPropType() => PropType.addSpeed;
  47. }
  48. /// <summary>
  49. /// 复活甲
  50. /// </summary>
  51. public sealed class AddLIFE : Prop
  52. {
  53. public AddLIFE(XY initPos) :
  54. base(initPos)
  55. {
  56. }
  57. public override PropType GetPropType() => PropType.addLIFE;
  58. }
  59. /// <summary>
  60. /// 护盾
  61. /// </summary>
  62. public sealed class Shield : Prop
  63. {
  64. public Shield(XY initPos) :
  65. base(initPos)
  66. {
  67. }
  68. public override PropType GetPropType() => PropType.Shield;
  69. }
  70. /// <summary>
  71. /// 矛
  72. /// </summary>
  73. public sealed class Spear : Prop
  74. {
  75. public Spear(XY initPos) :
  76. base(initPos)
  77. {
  78. }
  79. public override PropType GetPropType() => PropType.Spear;
  80. }
  81. #endregion
  82. // #region 所有坑人地雷
  83. ///// <summary>
  84. ///// 减速
  85. ///// </summary>
  86. // public sealed class MinusSpeed : DebuffMine
  87. //{
  88. // public MinusSpeed(XYPosition initPos) : base(initPos) { }
  89. // public override PropType GetPropType() => PropType.minusSpeed;
  90. // }
  91. ///// <summary>
  92. ///// 减少攻击力
  93. ///// </summary>
  94. // public sealed class MinusAP : DebuffMine
  95. //{
  96. // public MinusAP(XYPosition initPos) : base(initPos) { }
  97. // public override PropType GetPropType() => PropType.minusAP;
  98. // }
  99. ///// <summary>
  100. ///// 增加冷却
  101. ///// </summary>
  102. // public sealed class AddCD : DebuffMine
  103. //{
  104. // public AddCD(XYPosition initPos) : base(initPos) { }
  105. // public override PropType GetPropType() => PropType.addCD;
  106. // }
  107. // #endregion
  108. }