示例#1
0
 private void Attack(Ant target)
 {
     target.Kill();
 }
示例#2
0
 private void DrawAnt(Ant ant, Color color)
 {
     if (!ant.loc.IntersectsWith(new Rectangle(ant.home.Location.X, ant.home.Location.Y,14,14)))
     {
         mapGraphics.DrawEllipse(new Pen(color), ant.loc);
         if (ant.hasFood)
         {
             SolidBrush brush = new SolidBrush(Color.Green);
             mapGraphics.FillEllipse(brush, ant.loc);
         }
     }
 }