void OnTriggerEnter2D(Collider2D other) { if (other.CompareTag("Item")) { ItemBase item = other.GetComponent <ItemBase>(); item.Fly2(character); } }