示例#1
0
 /// <summary>
 /// helper method to respawn the tank at a random location on the map
 /// </summary>
 /// <param name="tank"></param>
 private void RespawnTank(Tank tank)
 {
     tank.setLocation(new Vector2D(RandomCoordinate(), RandomCoordinate()));
     while (collided(tank, new Vector2D(0, 0)))
     {
         tank.setLocation(new Vector2D(RandomCoordinate(), RandomCoordinate()));
     }
     tank.Activate();
 }