コード例 #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
ファイル: BulletSnowball.cs プロジェクト: TuringMac/TowerDef
 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
ファイル: Map.cs プロジェクト: Mtora/Defense-Of-The-Ancient
 /// <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)
 {
 }