private IEnumerator DetectingAnObject(float value, Fox fox) { yield return(new WaitForSeconds(value)); fox.Detected(); }