protected override void Update() { base.Update(); PlayerInjuryModule playerInjuryModule = PlayerInjuryModule.Get(); PlayerConditionModule playerConditionModule = PlayerConditionModule.Get(); for (int i = 0; i < this.m_WoundParameters.Count; i++) { if (i < playerInjuryModule.m_Injuries.Count) { Injury injury = playerInjuryModule.m_Injuries[i]; this.m_WoundParameters[i].enabled = true; this.m_WoundParameters[i].text = "Type: " + injury.m_Type.ToString(); if (injury.m_Type == InjuryType.SmallWoundAbrassion) { Text text = this.m_WoundParameters[i]; text.text = text.text + " TimeToHeal:" + (injury.GetHealingDuration() - (MainLevel.Instance.GetCurrentTimeMinutes() - injury.m_HealingStartTime)).ToString(); Text text2 = this.m_WoundParameters[i]; text2.text = text2.text + " HealTimeBonus: " + injury.m_HealingTimeDec.ToString(); } else if (injury.m_Type == InjuryType.SmallWoundScratch) { Text text3 = this.m_WoundParameters[i]; text3.text = text3.text + " TimeToHeal:" + (injury.GetHealingDuration() - (MainLevel.Instance.GetCurrentTimeMinutes() - injury.m_HealingStartTime)).ToString(); Text text4 = this.m_WoundParameters[i]; text4.text = text4.text + " HealTimeBonus: " + injury.m_HealingTimeDec.ToString(); } else if (injury.m_Type == InjuryType.Laceration || injury.m_Type == InjuryType.LacerationCat) { Text text5 = this.m_WoundParameters[i]; text5.text = text5.text + " TimeToHeal:" + (injury.GetHealingDuration() - (MainLevel.Instance.GetCurrentTimeMinutes() - injury.m_HealingStartTime)).ToString(); Text text6 = this.m_WoundParameters[i]; text6.text = text6.text + " Will transform to: " + injury.m_HealingResultInjuryState.ToString(); } else if (injury.m_Type == InjuryType.VenomBite) { Text text7 = this.m_WoundParameters[i]; text7.text = text7.text + " TimeToHeal:" + (injury.GetHealingDuration() - (MainLevel.Instance.GetCurrentTimeMinutes() - injury.m_HealingStartTime)).ToString(); Text text8 = this.m_WoundParameters[i]; text8.text = text8.text + " PoisonLevel: " + injury.m_PoisonLevel.ToString(); } else if (injury.m_Type == InjuryType.SnakeBite) { Text text9 = this.m_WoundParameters[i]; text9.text = text9.text + " TimeToHeal:" + (injury.GetHealingDuration() - (MainLevel.Instance.GetCurrentTimeMinutes() - injury.m_HealingStartTime)).ToString(); Text text10 = this.m_WoundParameters[i]; text10.text = text10.text + " PoisonLevel: " + injury.m_PoisonLevel.ToString(); } else if (injury.m_Type == InjuryType.Rash) { Text text11 = this.m_WoundParameters[i]; text11.text = text11.text + " TimeToHeal:" + (injury.GetHealingDuration() - (MainLevel.Instance.GetCurrentTimeMinutes() - injury.m_StartTimeInMinutes)).ToString(); Text text12 = this.m_WoundParameters[i]; text12.text = text12.text + " HealTimeBonus: " + injury.m_HealingTimeDec.ToString(); } else if (injury.m_Type == InjuryType.WormHole) { Text text13 = this.m_WoundParameters[i]; text13.text = text13.text + " TimeToHeal:" + (injury.GetHealingDuration() - (MainLevel.Instance.GetCurrentTimeMinutes() - injury.m_HealingStartTime)).ToString(); Text text14 = this.m_WoundParameters[i]; text14.text = text14.text + " HealTimeBonus: " + injury.m_HealingTimeDec.ToString(); } } else { this.m_WoundParameters[i].enabled = false; } } WaterCollider waterPlayerInside = WaterBoxManager.Get().GetWaterPlayerInside(); this.m_LeechCooldownText.text = "Leech chance: "; if (waterPlayerInside == null) { Text leechCooldownText = this.m_LeechCooldownText; leechCooldownText.text += "None"; } else { Text leechCooldownText2 = this.m_LeechCooldownText; leechCooldownText2.text += waterPlayerInside.m_LeechChance.ToString(); } Text leechCooldownText3 = this.m_LeechCooldownText; leechCooldownText3.text = leechCooldownText3.text + " Time to next leech: " + (playerInjuryModule.GetLeechNextTime() - MainLevel.Instance.GetCurrentTimeMinutes()).ToString(); Text leechCooldownText4 = this.m_LeechCooldownText; leechCooldownText4.text = leechCooldownText4.text + " CoolDown: " + Injury.s_LeechCooldownInMinutes.ToString(); this.m_HPText.text = "HP = " + playerConditionModule.GetHP().ToString() + "/" + playerConditionModule.GetMaxHP().ToString(); this.m_ConditionText.text = "Condition = " + playerConditionModule.GetEnergy().ToString() + "/" + playerConditionModule.GetMaxEnergy().ToString(); playerConditionModule.m_NutritionProteins = this.m_Proteins.value; playerConditionModule.m_NutritionFat = this.m_Fat.value; playerConditionModule.m_NutritionCarbo = this.m_Carbo.value; playerConditionModule.m_Hydration = this.m_Hydration.value; playerConditionModule.m_HP = this.m_HP.value; playerConditionModule.m_Energy = this.m_Energy.value; PlayerSanityModule.Get().m_Sanity = (int)this.m_Sanity.value; }
private void OnDestroy() { WaterBoxManager.Get().OnExitWater(this); }