Beispiel #1
0
        void Initialize(IniFile.IniSection lamp, Lighting scenario)
        {
            logger.Trace("Loading LightSource {0} at ({1},{2})", lamp.Name, Tile);

            // Read and assume default values
            LightVisibility = lamp.ReadDouble("LightVisibility", 5000.0);
            LightIntensity  = lamp.ReadDouble("LightIntensity", 0.0);
            LightRedTint    = lamp.ReadDouble("LightRedTint", 1.0);
            LightGreenTint  = lamp.ReadDouble("LightGreenTint", 1.0);
            LightBlueTint   = lamp.ReadDouble("LightBlueTint", 1.0);
            this.scenario   = scenario;
        }
Beispiel #2
0
        public Lighting(IniFile.IniSection iniSection)
        {
            Level   = iniSection.ReadDouble("Level", 0.032);
            Ambient = iniSection.ReadDouble("Ambient", 1.0);
            Red     = iniSection.ReadDouble("Red", 1.0);
            Green   = iniSection.ReadDouble("Green", 1.0);
            Blue    = iniSection.ReadDouble("Blue", 1.0);
            Ground  = iniSection.ReadDouble("Ground", 0.0);

            logger.Trace("Lighting loaded: level: {0}, ambient: {1}, red: {2}, green: {3}, blue: {4}, ground: {5}",
                         Level, Ambient, Red, Green, Blue, Ground);
        }