Esempio n. 1
0
 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))));
 }
Esempio n. 2
0
        public static void Add(string name, Vector2 <int> position, int eventGroups)
        {
            Planet planet = new Planet(name, position, eventGroups);

            planetLibrary.Add(planet);
        }