Beispiel #1
0
 void OnDestroy()
 {
     if (spectrumResolver != null)
     {
         spectrumResolver.OnDestroy();
         spectrumResolver = null;
     }
 }
Beispiel #2
0
        private void Initialize()
        {
            OnValidate();

            water = GetComponent <Water>();

            if (spectrumResolver == null)
            {
                spectrumResolver = new SpectrumResolver(this, spectrumShader);
            }
            if (windDirectionChanged == null)
            {
                windDirectionChanged = new WindWavesEvent();
            }

            CreateObjects();

            initialized = true;
        }