/// <summary> /// 停止追踪 /// </summary> /// <param name="TrackingTower">追踪塔</param> public void Untrack(Tower TrackingTower) { LinkedListNode<TrackingRecord> Current = FTrackingTowers.First; while (Current != null) { LinkedListNode<TrackingRecord> Next = Current.Next; if (Current.Value.TrackingTower == TrackingTower) { FTrackingTowers.Remove(Current); } Current = Next; } }
public Snowball(Mob target, Tower parent) : base(target, parent) { }
/// <summary> /// 追踪 /// </summary> /// <param name="TrackingTower">追踪塔</param> /// <param name="Steps">步数</param> public void Track(Tower TrackingTower, int Steps) { foreach (TrackingRecord r in FTrackingTowers) { if (r.TrackingTower == TrackingTower) { r.RemainSteps += Steps; return; } } TrackingRecord tr = new TrackingRecord(); tr.TrackingTower = TrackingTower; tr.RemainSteps = Steps; FTrackingTowers.AddLast(tr); }
public override bool IsMine(Tower aTower) { return aTower is TrapTower; }
/// <summary> /// 设置单元格上的塔 /// </summary> /// <param name="Col">横坐标</param> /// <param name="Row">纵坐标</param> /// <param name="aTower">塔</param> public void SetTower(int X, int Y, Tower aTower) { int Col = X / _CellSize; int Row = Y / _CellSize; if (aTower != null) { aTower.Position = new PointF(Col * _CellSize + _CellSize / 2, Row * _CellSize + _CellSize / 2); } FMap.Cells(Col, Row).Tower = aTower; }
public abstract bool IsMine(Tower aTower);
public override bool IsMine(Tower aTower) { return aTower is SpeedTower; }
public override bool IsMine(Tower aTower) { return aTower is RangeTower; }
public override bool IsMine(Tower aTower) { return aTower is MultiTower; }
public Potion(Mob target, Tower parent) : base(target, parent) { }