/// <summary> /// Switches to a different biome and sets the destination biome as the active one. /// </summary> /// <param name="destinationBiome"> the biome to transition to</param> public void SwitchToBiome(PostProcessVolume destinationBiome) { if (HasFinishedTransition) { StartCoroutine(FadeBiome(destinationBiome)); OnBiomeChanged?.Invoke(destinationBiome); HasFinishedTransition = false; } }
public void PerformInstantSwap(Board board) { if (board.Biome != Type) { if (ActiveBiome != null) { ActiveBiome.weight = 0; } BiomeAmbiences[board.Biome].weight = 1f; ActiveBiome = BiomeAmbiences[board.Biome]; ToggleWeatherParticle(Type, false); ToggleWeatherParticle(board.Biome, true); Type = board.Biome; OnBiomeChanged?.Invoke(BiomeAmbiences[board.Biome]); } }