예제 #1
0
        public void Generate(WorldParams param)
        {
            int childrenCount = Random.Range(1, param.Size * 2 - 1);

            Children = new List <WorldGraphNode>(childrenCount);

            if (Level == WorldLevel.PlanetarySystem)
            {
                // TODO: Planetary system types


                return;
            }

            for (int i = 0; i < childrenCount; i++)
            {
                Children[i] = new WorldGraphNode(Level - 1);
                Children[i].Generate(param);
            }
        }
        public void Generate(WorldParams param)
        {
            WorldGraphNode root = new WorldGraphNode(param.Root);

            root.Generate(param);
        }