public override void update() { if (box.Collided(hero.getPosition()) && box.Visible) { hero.collect(this); } }