/// <summary>
 /// Applied before GetMingleCell runs.
 /// </summary>
 internal static void Prefix(MingleCellSensor ___mingleCellSensor)
 {
     if (___mingleCellSensor != null)
     {
         MingleCellSensorUpdater.Update(___mingleCellSensor);
     }
 }
Exemple #2
0
 /// <summary>
 /// Updates the sensors only once a second, as opposed to every frame.
 /// </summary>
 private void RunUpdate()
 {
     if (id != null && !id.HasTag(GameTags.Dead))
     {
         // The order of sensors matters here
         if (pathSensor != null)
         {
             PathProberSensorUpdater.Update(pathSensor);
         }
         if (pickupSensor != null)
         {
             PickupableSensorUpdater.Update(pickupSensor);
         }
         if (edibleSensor != null)
         {
             ClosestEdibleSensorUpdater.Update(edibleSensor);
         }
         if (balloonSensor != null && traits.HasTrait("BalloonArtist"))
         {
             BalloonStandCellSensorUpdater.Update(balloonSensor);
         }
         if (idleSensor != null)
         {
             IdleCellSensorUpdater.Update(idleSensor);
         }
         if (mingleSensor != null)
         {
             MingleCellSensorUpdater.Update(mingleSensor);
         }
         if (safeSensor != null)
         {
             SafeCellSensorUpdater.Update(safeSensor);
         }
         if (toiletSensor != null)
         {
             ToiletSensorUpdater.Update(toiletSensor);
         }
         // AssignableReachabilitySensor and BreathableAreaSensor are pretty cheap
     }
 }