private void Update() { if (moveTo) { this.transform.position = Vector2.MoveTowards(transform.position, player.transform.position, 1f * Time.deltaTime); if (Vector2.Distance(transform.position, player.transform.position) < 0.2f) { iitem.Pickup(player); } } }