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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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. #endregion
  97. // #region 所有坑人地雷
  98. ///// <summary>
  99. ///// 减速
  100. ///// </summary>
  101. // public sealed class MinusSpeed : DebuffMine
  102. //{
  103. // public MinusSpeed(XYPosition initPos) : base(initPos) { }
  104. // public override PropType GetPropType() => PropType.minusSpeed;
  105. // }
  106. ///// <summary>
  107. ///// 减少攻击力
  108. ///// </summary>
  109. // public sealed class MinusAP : DebuffMine
  110. //{
  111. // public MinusAP(XYPosition initPos) : base(initPos) { }
  112. // public override PropType GetPropType() => PropType.minusAP;
  113. // }
  114. ///// <summary>
  115. ///// 增加冷却
  116. ///// </summary>
  117. // public sealed class AddCD : DebuffMine
  118. //{
  119. // public AddCD(XYPosition initPos) : base(initPos) { }
  120. // public override PropType GetPropType() => PropType.addCD;
  121. // }
  122. // #endregion
  123. }