public void Cure() { if (Item) { Destroy(Item.gameObject); ReplenishBB.Raise(); } PatientCured.Raise(this.gameObject); StartCoroutine(CureRoutine()); }
void Update() { if (!IsDead) { Blood -= BloodLossRate * Time.deltaTime * _HSManager.DifficultyMultiplier; if (Blood <= 0f) { IsDead = true; PatientDead?.Raise(this.gameObject); if (Item) { Destroy(Item.gameObject); ReplenishBB.Raise(); } StartCoroutine(CureRoutine()); } BloodSprite.transform.localScale = Vector3.Lerp(new Vector3(1f, 0f, 1f), Vector3.one, Blood / MaxBlood); Item?.Effect(this); if (!_over90 && Blood >= 90f) { HighlightRenderer.material.SetFloat("_OutlineThickness", 5); HighlightRenderer.material.SetColor("_OutlineColor", Color.green); _over90 = true; } if (_over90 && Blood < 90f) { print("oiiiiiii"); HighlightRenderer.material.SetFloat("_OutlineThickness", 0); HighlightRenderer.material.SetColor("_OutlineColor", _highlightColor); _over90 = false; } } }