update sprite batch in the update function