예제 #1
0
        private PlanetResources GenerateResources(PlanetType planetType)
        {
            PlanetResources generatedResources = new PlanetResources()
            {
                Oxygen = GenerateResource(planetType.Resources.Oxygen),
                Food   = GenerateResource(planetType.Resources.Food),
                Fuel   = GenerateResource(planetType.Resources.Fuel)
            };

            return(generatedResources);
        }
예제 #2
0
 public Planet GeneratePlanet(PlanetType planetType)
 {
     return(new Planet()
     {
         Type = planetType,
         BaseColor = planetType.BaseColors.GetRandomEntry(),
         LandColor = planetType.LandColors.GetRandomEntry(),
         LandSprite = planetType.LandSprites.GetRandomEntry(),
         CloudColor = planetType.CloudColors.GetRandomEntry(),
         CloudSprite = planetType.CloudSprites.GetRandomEntry(),
         Resources = GenerateResources(planetType)
     });
 }