示例#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
 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;
        }