public void ReactToHit() { WanderingAI behaviour = GetComponent <WanderingAI>(); if (behaviour != null) { behaviour.Kill(); } StartCoroutine(Die()); }