lislis / ridingintheparkwithparrots

A game about riding your bike in the park with parrots
MIT License
6 stars 1 forks source link

Only setup score once #3

Open jannic opened 1 year ago

jannic commented 1 year ago

If there are multiple instances, score_q.get_single_mut() doesn't return any.

Therefore, if you started the game more than once, the score was always shown as 0.

So, instead of spawning a second instance, just clear out the existing one.

Not that I now close to nothing about bevy or ECS in general. So this might not be the right way to fix it. But it seems to work :-)