Beispiel #1
0
 public Vector3 AvgPos(Obj_AI_Minion[] objects)
 {
     double x = 0, y = 0;
     foreach (Obj_AI_Minion obj in objects)
     {
         x += obj.Position.X;
         y += obj.Position.Y;
     }
     return new Vector2((float) (x/objects.Count()), (float) (y/objects.Count())).To3DWorld();
 }