Пример #1
0
 void EatMass(float mass, FallingObject fo = null)           // if fo != null => destroy the object
 {
     m_MonsterContr.EatMass(mass);
     if (fo)
     {
         m_ChewingObjects.Remove(fo);
         Destroy(fo);
     }
     m_MassChewingObjs -= mass;
     if (m_MassChewingObjs < 0.001f)
     {
         m_State = HeadState.Stationary;
     }
     else
     {
         m_State = HeadState.Chewing;
     }
 }