public void ApplyLamp(LightSource lamp, double lsEffect, bool ambientOnly = false) { _ambientMult += lsEffect * lamp.LightIntensity; if (!ambientOnly) { _redMult += lsEffect * lamp.LightRedTint; _greenMult += lsEffect * lamp.LightGreenTint; _blueMult += lsEffect * lamp.LightBlueTint; } }
private void LoadLightSources() { Logger.Info("Loading light sources"); foreach (StructureObject s in _structureObjects.ToList()) { var section = _rules.GetSection(s.Name); if (section != null && section.HasKey("LightVisibility")) { var ls = new LightSource(_rules.GetSection(s.Name), _lighting); ls.Tile = s.Tile; _lightSources.Add(ls); } } }