Commit 71ef5ba0 authored by Florian Oetke's avatar Florian Oetke
Browse files

fixed gameover condition

parent 72b82b73
Pipeline #3283 passed with stage
in 2 minutes and 42 seconds
......@@ -50,6 +50,15 @@ namespace phase_shifter::gameplay {
factor * (1.f - smootherstep(0.f, t2_len, from)));
}
void Beat_system::decrease_beats_left(int count) { _state.beats_left -= count; }
void Beat_system::decrease_beats_left(int count)
{
if(_state.beats_left > 0) {
_state.beats_left -= count;
if(_state.beats_left <= 0) {
_bus.send<Lose_msg>();
}
}
}
} // namespace phase_shifter::gameplay
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment