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.2 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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, PlaceType place, int radius = GameData.PropRadius) :
  19. base(initPos, radius, GameObjType.Prop)
  20. {
  21. this.place = place;
  22. this.CanMove = false;
  23. this.moveSpeed = GameData.PropMoveSpeed;
  24. }
  25. }
  26. ///// <summary>
  27. ///// 坑人地雷
  28. ///// </summary>
  29. // public abstract class DebuffMine : Prop
  30. //{
  31. // public DebuffMine(XYPosition initPos) : base(initPos) { }
  32. // }
  33. #region 所有增益道具
  34. /// <summary>
  35. /// 增加速度
  36. /// </summary>
  37. public sealed class AddSpeed : Prop
  38. {
  39. public AddSpeed(XY initPos, PlaceType placeType) :
  40. base(initPos, placeType)
  41. {
  42. }
  43. public override PropType GetPropType() => PropType.addSpeed;
  44. }
  45. /// <summary>
  46. /// 复活甲
  47. /// </summary>
  48. public sealed class AddLIFE : Prop
  49. {
  50. public AddLIFE(XY initPos, PlaceType placeType) :
  51. base(initPos, placeType)
  52. {
  53. }
  54. public override PropType GetPropType() => PropType.addLIFE;
  55. }
  56. /// <summary>
  57. /// 护盾
  58. /// </summary>
  59. public sealed class Shield : Prop
  60. {
  61. public Shield(XY initPos, PlaceType placeType) : base(initPos, placeType)
  62. {
  63. }
  64. public override PropType GetPropType() => PropType.Shield;
  65. }
  66. /// <summary>
  67. /// 矛
  68. /// </summary>
  69. public sealed class Spear : Prop
  70. {
  71. public Spear(XY initPos, PlaceType placeType) : base(initPos, placeType)
  72. {
  73. }
  74. public override PropType GetPropType() => PropType.Spear;
  75. }
  76. #endregion
  77. // #region 所有坑人地雷
  78. ///// <summary>
  79. ///// 减速
  80. ///// </summary>
  81. // public sealed class MinusSpeed : DebuffMine
  82. //{
  83. // public MinusSpeed(XYPosition initPos) : base(initPos) { }
  84. // public override PropType GetPropType() => PropType.minusSpeed;
  85. // }
  86. ///// <summary>
  87. ///// 减少攻击力
  88. ///// </summary>
  89. // public sealed class MinusAP : DebuffMine
  90. //{
  91. // public MinusAP(XYPosition initPos) : base(initPos) { }
  92. // public override PropType GetPropType() => PropType.minusAP;
  93. // }
  94. ///// <summary>
  95. ///// 增加冷却
  96. ///// </summary>
  97. // public sealed class AddCD : DebuffMine
  98. //{
  99. // public AddCD(XYPosition initPos) : base(initPos) { }
  100. // public override PropType GetPropType() => PropType.addCD;
  101. // }
  102. // #endregion
  103. }