using Preparation.Interface; using Preparation.Utility; using Preparation.GameData; namespace GameClass.GameObj { public abstract class Prop : ObjOfCharacter { protected bool laid = false; public bool Laid => laid; // 道具是否放置在地图上 public override bool IsRigid => true; protected override bool IgnoreCollideExecutor(IGameObj targetObj) { if (targetObj.Type == GameObjType.BirthPoint || targetObj.Type == GameObjType.Prop || targetObj.Type == GameObjType.Bullet || targetObj.Type == GameObjType.Character) return true; return false; } public override ShapeType Shape => ShapeType.Square; public abstract PropType GetPropType(); public Prop(XY initPos, int radius = GameData.PropRadius) : base(initPos, radius, PlaceType.Land, GameObjType.Prop) { this.CanMove = false; this.moveSpeed = GameData.PropMoveSpeed; } public void SetNewPos(XY pos) { this.Position = pos; } } /// /// 增益道具 /// public abstract class BuffProp : Prop { public BuffProp(XY initPos) : base(initPos) { } } ///// ///// 坑人地雷 ///// // public abstract class DebuffMine : Prop //{ // public DebuffMine(XYPosition initPos) : base(initPos) { } // } #region 所有增益道具 /// /// 增加速度 /// public sealed class AddSpeed : BuffProp { public AddSpeed(XY initPos) : base(initPos) { } public override PropType GetPropType() => PropType.addSpeed; } /// /// 复活甲 /// public sealed class AddLIFE : BuffProp { public AddLIFE(XY initPos) : base(initPos) { } public override PropType GetPropType() => PropType.addLIFE; } /// /// 护盾 /// public sealed class Shield : BuffProp { public Shield(XY initPos) : base(initPos) { } public override PropType GetPropType() => PropType.Shield; } /// /// 矛 /// public sealed class Spear : BuffProp { public Spear(XY initPos) : base(initPos) { } public override PropType GetPropType() => PropType.Spear; } #endregion // #region 所有坑人地雷 ///// ///// 减速 ///// // public sealed class MinusSpeed : DebuffMine //{ // public MinusSpeed(XYPosition initPos) : base(initPos) { } // public override PropType GetPropType() => PropType.minusSpeed; // } ///// ///// 减少攻击力 ///// // public sealed class MinusAP : DebuffMine //{ // public MinusAP(XYPosition initPos) : base(initPos) { } // public override PropType GetPropType() => PropType.minusAP; // } ///// ///// 增加冷却 ///// // public sealed class AddCD : DebuffMine //{ // public AddCD(XYPosition initPos) : base(initPos) { } // public override PropType GetPropType() => PropType.addCD; // } // #endregion }