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); }
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) }); }