/// <summary> /// Applied before GetIdleCell runs. /// </summary> internal static void Prefix(IdleCellSensor ___idleCellSensor) { if (___idleCellSensor != null) { IdleCellSensorUpdater.Update(___idleCellSensor); } }
/// <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 } }