private void OnTriggerEnter2D(Collider2D coll) { if (coll.CompareTag("TrashMan")) { TrashMan enemy = coll.transform.GetComponent <TrashMan>(); enemy.StartThrowing(); } }