Inheritance: StructureObject
Beispiel #1
0
		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;
			}
		}
Beispiel #2
0
		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);
				}
			}
		}