Ejemplo n.º 1
0
 void RandomMove()
 {
     currentMoveTimer += Time.fixedDeltaTime;
     if (currentMoveTimer > MoveTimerTotal)
     {
         currentMoveTimer = 0;
         MoveTimerTotal   = CitizenMgr.GenerateMovePeriod();
         if (mCitizen.CheckReachDest())
         {
             int loopTimes = 0;
             while (loopTimes++ < 10)
             {
                 if (mCitizen.TryMove(CitizenMgr.GenerateMoveDest(), 0.1f))
                 {
                     break;
                 }
             }
         }
     }
 }