void Start() { // Get Daggerfall Unity components streamingWorld = GameManager.Instance.StreamingWorld; playerWeather = GameManager.Instance.WeatherManager.PlayerWeather; windZone = GameManager.Instance.WeatherManager.GetComponent <WindZone>(); // Setup mod Setup(); Mod.MessageReceiver = VibrantWindModMessages.MessageReceiver; // Start mod ToggleMod(true, false); }
void DisableWeatherAndSound() { if (!enableWeather) { PlayerWeather playerWeather = GameManager.Instance.WeatherManager.PlayerWeather; playerWeather.RainParticles.SetActive(false); playerWeather.SnowParticles.SetActive(false); playerWeather.enabled = false; } if (!enableSounds) { GameManager.Instance.PlayerActivate.GetComponentInParent <PlayerFootsteps>().enabled = false; ridingVolume = GameManager.Instance.TransportManager.RidingVolumeScale; GameManager.Instance.TransportManager.RidingVolumeScale = 0f; } if (!enableRealGrass) { ModManager.Instance.SendModMessage("Real Grass", "toggle", false); } }
void EnableWeatherAndSound() { if (!enableWeather) { PlayerWeather playerWeather = GameManager.Instance.WeatherManager.PlayerWeather; playerWeather.enabled = true; switch (playerWeather.WeatherType) { case WeatherType.Rain: case WeatherType.Thunder: playerWeather.RainParticles.SetActive(true); playerWeather.SnowParticles.SetActive(false); break; case WeatherType.Snow: playerWeather.RainParticles.SetActive(false); playerWeather.SnowParticles.SetActive(true); break; default: playerWeather.RainParticles.SetActive(false); playerWeather.SnowParticles.SetActive(false); break; } } if (!enableSounds) { GameManager.Instance.PlayerActivate.GetComponentInParent <PlayerFootsteps>().enabled = true; GameManager.Instance.TransportManager.RidingVolumeScale = ridingVolume == 0 ? 0.6f : ridingVolume; } if (!enableRealGrass) { ModManager.Instance.SendModMessage("Real Grass", "toggle", true); } }