示例#1
0
 public int GetImportance()
 {
     if (m_mixBus == null)
     {
         return(m_importance);
     }
     else
     {
         return(m_importance + m_mixBus.GetImportance());
     }
 }
示例#2
0
        void Update()
        {
            if (m_parent == null)
            {
                m_mixedVol        = m_volumeMult;
                m_totalImportance = m_importance;
            }
            else
            {
                m_mixedVol        = m_parent.GetMixedVol() * m_volumeMult;
                m_totalImportance = m_parent.GetImportance() + m_totalImportance;
            }

            foreach (BaseAutomaticDuck duck in m_duckList)
            {
                m_mixedVol *= duck.GetDuckVol();
            }
        }