Example #1
0
        private Color getSunColor(SunType type)
        {
            Color orange = new Color(255, 128, 0);
            Color cyan   = new Color(113, 120, 239);

            Color[] all = { cyan, orange, Color.Magenta, Color.White, Color.Red, Color.Yellow };
            Random  r   = new Random(SystemDescription.Seed - 333);

            switch (type)
            {
            case SunType.Cyan:
                return(cyan);

            case SunType.Magenta:
                return(Color.Magenta);

            case SunType.Orange:
                return(orange);

            case SunType.Red:
                return(Color.Red);

            case SunType.White:
                return(Color.White);

            case SunType.Yellow:
                return(Color.Yellow);

            case SunType.Giant:
                return(Color.Red);

            default:
                return(all[r.Next(0, 7)]);
            }
        }
Example #2
0
 public RootDefinition(double SolarMasses, SunType SunType)
 {
     this.SolarMasses = SolarMasses;
     this.SunType     = SunType;
 }
 public RootDefinition(double SolarMasses, SunType SunType)
 {
     this.SolarMasses = SolarMasses;
     this.SunType = SunType;
 }
Example #4
0
 public Sun(SunType type)
 {
     Type = type;
 }