예제 #1
0
        public override void Set(Effect effect, RenderContext context, Matrix transform)
        {
            Actor        fogActor = GameResources.ActorManager.GetActorById(context.SceneResources.FogActorId);
            FogComponent fog      = fogActor.GetComponent <FogComponent>(ActorComponent.ComponentType.Fog);

            EffectRegistry.Params[effect][EffectRegistry.FOGCOLOR_PARAM_NAME].SetValue(fog.Color.ToVector3());
            EffectRegistry.Params[effect][EffectRegistry.FOGSTART_PARAM_NAME].SetValue(fog.Start);
            EffectRegistry.Params[effect][EffectRegistry.FOGEND_PARAM_NAME].SetValue(fog.End);
        }
예제 #2
0
        private void FogCreatedHandler(object sender, EventArgs e)
        {
            FogComponent fog = sender as FogComponent;

            Resources.FogActorId = fog.Owner.Id;
        }