コード例 #1
0
 /// <summary> Updates FadeValue. Called when updating events or values. </summary>
 public void UpdateFadeValue()
 {
     if (m_requirements == ValuesOrEvents.ValuesOrEvents)
     {
         FadeValue = Mathf.Max(AmbienceManager.CheckEvents(m_events, m_eventsMix) ? 1f : 0f, AmbienceManager.CheckValues(m_values, m_valuesMix));
         return;
     }
     if ((m_requirements & ValuesOrEvents.Events) == ValuesOrEvents.Events)
     {
         if (!AmbienceManager.CheckEvents(m_events, m_eventsMix))
         {
             FadeValue = 0f;
             return;
         }
     }
     if ((m_requirements & ValuesOrEvents.Values) == ValuesOrEvents.Values)
     {
         FadeValue = AmbienceManager.CheckValues(m_values, m_valuesMix);
     }
     else
     {
         FadeValue = 1f;
     }
 }