Ejemplo n.º 1
0
 // Update conditions
 void UpdatePhysicalConditions()
 {
     // Wellness - Physical conditions
     m_Pain.Update();
     m_Sick.Update();
     m_Wounded.Update();
     m_Damage.Update();
     m_Tired.Update();
     m_Hungry.Update();
     m_Thirsty.Update();
     m_Dead.Update();
 }
Ejemplo n.º 2
0
        /// <summary>Updates each tissue, make changes in DM and N effective.</summary>
        internal bool Update()
        {
            // save current state
            double previousDM = DMTotal;
            double previousN  = NTotal;

            // update all tissues
            Live.Update();
            Dead.Update();

            // check mass balance
            bool dmIsOk = MathUtilities.FloatsAreEqual(previousDM + DMGrowth - DMDetached, DMTotal, 0.000001);
            bool nIsOk  = MathUtilities.FloatsAreEqual(previousN + NGrowth - NLuxuryRemobilised - NSenescedRemobilised - NDetached, NTotal, 0.000001);

            return(dmIsOk || nIsOk);
        }