Пример #1
0
        public PlanetaryObject(string name, int i, SolarSystem parent, PlanetaryType type, PlanetarySubType subType) : base()
        {
            Parent = parent;
            Name   = name;
            Color  = Color.White;
            Seed   = Guid.NewGuid().GetHashCode();

            Type    = type;
            SubType = subType;

            if (Type == PlanetaryType.Planet && Parent != null)
            {
                Name        = PlanetNamer.AddSuffix(Parent.NameStyle, Name, i);
                Description = i.AddOrdinal() + " Planet, " + subType.Name;
            }
            else if (Type == PlanetaryType.Sun)
            {
                Description = SubType.Name + " - Planetary System";
            }
        }
Пример #2
0
 private PlanetaryType GetRandomPlanetaryType()
 {
     return(PlanetaryType.GetRandomPlanetaryType(rnd));
 }