예제 #1
0
 /// <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;
     }
 }
예제 #2
0
 public Snowball(Mob target, Tower parent)
     : base(target, parent)
 {
 }
예제 #3
0
 /// <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);
 }
예제 #4
0
 public override bool IsMine(Tower aTower)
 {
     return aTower is TrapTower;
 }
예제 #5
0
 /// <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;
 }
예제 #6
0
 public abstract bool IsMine(Tower aTower);
예제 #7
0
 public override bool IsMine(Tower aTower)
 {
     return aTower is SpeedTower;
 }
예제 #8
0
 public override bool IsMine(Tower aTower)
 {
     return aTower is RangeTower;
 }
예제 #9
0
 public override bool IsMine(Tower aTower)
 {
     return aTower is MultiTower;
 }
예제 #10
0
 public Potion(Mob target, Tower parent)
     : base(target, parent)
 {
 }