public WolfAgent agent; // void OnCollisionEnter(Collision col) { // Touched prey if (col.gameObject.CompareTag("goal")) { agent.IScoredAGoal(); } }