示例#1
0
 private void ActiveCell_MouseLeftButtonUp(object sender, MouseEventArgs e)
 {
     foreach (UIElement ue in MapCanvas.Children)
     {
         if (ue is LandCell) {
             LandCell lc = (LandCell)ue;
             if (lc.Clicked)
             {
                 GunCell gc = new GunCell(lc.X, lc.Y);
                 MapCanvas.Children.Add(gc);
                 _map.AddGunCell(gc);
                 MapCanvas.Children.Remove(ue);
                 break;
             }
         }
     }
 }
示例#2
0
文件: Map.cs 项目: MinZhu/Defence
 public void AddGunCell(GunCell gc)
 {
     _gunCells.Add(gc);
 }