protected override void Init() { LightComponent = Components.Single(c => c.Id == LightComponentId) as LightComponent; Light = LightComponent.Light; var sphere = Children.First(c => c.Id == LightSphereId) as Sphere; sphere.Material.Ambient = new Vector4(1, 1, 0, 1); sphere.Material.TextureName = "stone"; }
public LightObject(ILight light) { LightComponent = new LightComponent(this, light); AddComponent(LightComponent); }
public void SetCurrentLight(LightComponent lightComponent) { if (!_gameObjects.Any(g => g.Components.Contains(lightComponent))) { throw new Exception("Light is not part of this scene"); } CurrentLight = lightComponent; }