private void OnTriggerEnter(Collider other) { if (other.GetComponent <Beast>()) { _detectedBeast = other.GetComponent <Beast>(); } }
private IEnumerator ClearDetectedBeastAfterDelay() { yield return(new WaitForSeconds(3f)); _detectedBeast = null; }