opti(particles): fetch ThreadRng only once in a system
This commit is contained in:
parent
f3f74f668a
commit
9f04ec861e
2 changed files with 18 additions and 10 deletions
|
|
@ -290,8 +290,7 @@ fn collision_event_system(
|
|||
.clamp(Vec4::ZERO, Vec4::ONE);
|
||||
|
||||
// If color approximately white
|
||||
if app_state.current() == &AppState::Game
|
||||
&& new_color.min_element() >= 0.9
|
||||
if app_state.current() == &AppState::Game && new_color.min_element() >= 0.9
|
||||
{
|
||||
app_state.replace(AppState::Win).ok();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue