Weather Controller
Last updated
Last updated
Presented by IWeatherController
interface, this system allows to start or stop raining, start or stop wind and change their intensity.
To use this system, just drag WeatherController
prefab onto your game scene and set it up as you wish:
Rain Particles – reference to rain object. Plese, don't change it.
Initial Weather – initial rain state. It can be None, RainingLight, RainingMedium or RainingHeavy.
Initial Wind State – initial wind power. It can be None, Light, Medium or Heavy.
You can also use this system via code. For this, inject IWeatherController
interface into your class and call needed methods.
This method allows to set current weather state. It can be None, RainingLight, RainingMedium or RainingHeavy. You can also set certain weather change time by fadeDuration parameter.
Example:
This method allows to set current wind power. It can be None, Light, Medium or Heavy.
Example:
You can see how it works on the WeatherTestScene
, which is situated in Assets/Heroic Engine/Example/Scenes
directory.