Example #1
0
 public override void TransitionReason()
 {
     if (mCitizen.timeAlive > mCitizen.ToHospTimeTotal)
     {
         mFSMSystem.TransitionFSMState(FSMTransition.WantHealing);
         return;
     }
     else if (!mCitizen.CheckAlive())
     {
         mFSMSystem.TransitionFSMState(FSMTransition.ToLate);
         CitizenMgr.IllCnt--;
         return;
     }
     if (mCitizen.bCheckAmbulanceKey)
     {
         mCitizen.bCheckAmbulanceKey = false;
         if (CitizenMgr.CheckBedsAvailable())
         {
             mFSMSystem.TransitionFSMState(FSMTransition.TookByAmbulance);
         }
         else
         {
             mFSMSystem.TransitionFSMState(FSMTransition.CantTakeAmbulance);
         }
         return;
     }
 }
Example #2
0
 public override void TransitionReason()
 {
     if (!mCitizen.CheckAlive())
     {
         mFSMSystem.TransitionFSMState(FSMTransition.ToLate);
         CitizenMgr.IllCnt--;
     }
     else if (CitizenMgr.CheckBedsAvailable())
     {
         mCitizen.bMovingToHosp = true;
         mFSMSystem.TransitionFSMState(FSMTransition.BedsAvailable);
     }
 }
Example #3
0
 public override void TransitionReason()
 {
     if (mCitizen.timeAlive > mCitizen.LatentTimeTotal)
     {
         mFSMSystem.TransitionFSMState(FSMTransition.AfterLatent);
         return;
     }
     if (mCitizen.bCheckAmbulanceKey)
     {
         mCitizen.AliveTimeTotal += mCitizen.LatentTimeTotal - mCitizen.timeAlive;
         mCitizen.timeAlive       = 0;
         if (CitizenMgr.CheckBedsAvailable())
         {
             mFSMSystem.TransitionFSMState(FSMTransition.TookByAmbulance);
         }
         else
         {
             mFSMSystem.TransitionFSMState(FSMTransition.CantTakeAmbulance);
         }
         CitizenMgr.IllCnt++;
         return;
     }
 }