public static float GetDistance(Planet from, Planet to) { return(Convert.ToSingle(Math.Sqrt(Math.Pow(to.worldPosition.x - from.worldPosition.x, 2) + Math.Pow(to.worldPosition.y - from.worldPosition.y, 2)))); }
public static void Add(string name, Vector2 <int> position, int eventGroups) { Planet planet = new Planet(name, position, eventGroups); planetLibrary.Add(planet); }