void OnCollisionEnter(Collision other) { /*GridAgent newAgent = other.gameObject.GetComponent<GridAgent>(); * if (newAgent) * { * newAgent.DeactivateAgent(); * }*/ Testing newManager = other.gameObject.GetComponentInChildren <Testing>(); if (newManager) { newManager.EndGame(); } }