예제 #1
0
        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";
        }
예제 #2
0
파일: LightObject.cs 프로젝트: pdeparcq/iGL
 public LightObject(ILight light)
 {
     LightComponent = new LightComponent(this, light);
     AddComponent(LightComponent);
 }
예제 #3
0
파일: Scene.cs 프로젝트: pdeparcq/iGL
        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;
        }