public int GetImportance() { if (m_mixBus == null) { return(m_importance); } else { return(m_importance + m_mixBus.GetImportance()); } }
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(); } }