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); }
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); }