private void Awake( ) { if (activateWind) { _wind = new WindProperties(minMaxFrequency, minVelocity, maxVelocity); } }
private void Update( ) { //Only in Unity Editor, if something changes we have to get those values and pick a random between them again #if UNITY_EDITOR bool something_changed = _previous_activate_wind != activateWind; if (activateWind) { something_changed |= minVelocity != _previous_min_velocity || maxVelocity != _previous_max_velocity || minMaxFrequency != _previous_min_max_frequency; if (something_changed) { _wind = new WindProperties(minMaxFrequency, minVelocity, maxVelocity); } _wind.Update( ); } #endif }