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 4.0 kB

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