public void BuildEffect(Type weatherType, int numParticles, float drawDist, SimEngine sim)
        {
            if (weatherType == typeof(Rain))
                WeatherEffect = new Rain();
            else if (weatherType == typeof(Snow))
                WeatherEffect = new Snow();

            WeatherEffect.LoadContent(sim.Content, sim.GraphicsDevice);
            WeatherEffect.Build(new Cube(new Vector3(Base.X,0,Base.Y), ceiling, Base.Width, Base.Height), numParticles, sim.GraphicsDevice);
            WeatherEffect.Effect.Parameters["fDrawDist"].SetValue(drawDist * 0.9f);
        }
Пример #2
0
        public void BuildEffect(Type weatherType, int numParticles, float drawDist, SimEngine sim)
        {
            if (weatherType == typeof(Rain))
            {
                WeatherEffect = new Rain();
            }
            else if (weatherType == typeof(Snow))
            {
                WeatherEffect = new Snow();
            }

            WeatherEffect.LoadContent(sim.Content, sim.GraphicsDevice);
            WeatherEffect.Build(new Cube(new Vector3(Base.X, 0, Base.Y), ceiling, Base.Width, Base.Height), numParticles, sim.GraphicsDevice);
            WeatherEffect.Effect.Parameters["fDrawDist"].SetValue(drawDist * 0.9f);
        }