Esempio n. 1
0
        private void NewPrefixPatch(Survival __instance, float timePassed)
        {
            totalFoodThirstDamage = 0f;
            const float minimumPastTime = 1.401298E-45f;

            if (minimumPastTime > timePassed)
            {
                return;
            }

            float startingFood  = __instance.food;
            float startingWater = __instance.water;

            UpdateFood(__instance, timePassed);
            UpdateWater(__instance, timePassed);

            __instance.UpdateWarningSounds(__instance.foodWarningSounds, __instance.food, startingFood, __instance.GetLowFoodThreshold(),
                                           __instance.GetCriticalFoodThreshold());

            __instance.UpdateWarningSounds(__instance.waterWarningSounds, __instance.water, startingWater, __instance.GetLowWaterThreshold(),
                                           __instance.GetCriticalWaterThreshold());
        }