Fixed bug where changing layout on game over would overflow timer
This commit is contained in:
@@ -420,16 +420,22 @@ int main(void)
|
|||||||
{
|
{
|
||||||
state.layout = State<X, Y>::Layout::UNLIMITED;
|
state.layout = State<X, Y>::Layout::UNLIMITED;
|
||||||
state.reset();
|
state.reset();
|
||||||
|
time_start = Clock::now();
|
||||||
|
time_cur = time_start;
|
||||||
}
|
}
|
||||||
else if (IsKeyPressed(KEY_TWO))
|
else if (IsKeyPressed(KEY_TWO))
|
||||||
{
|
{
|
||||||
state.layout = State<X, Y>::Layout::WALLS;
|
state.layout = State<X, Y>::Layout::WALLS;
|
||||||
state.reset();
|
state.reset();
|
||||||
|
time_start = Clock::now();
|
||||||
|
time_cur = time_start;
|
||||||
}
|
}
|
||||||
else if (IsKeyPressed(KEY_THREE))
|
else if (IsKeyPressed(KEY_THREE))
|
||||||
{
|
{
|
||||||
state.layout = State<X, Y>::Layout::WALLED_GARDEN;
|
state.layout = State<X, Y>::Layout::WALLED_GARDEN;
|
||||||
state.reset();
|
state.reset();
|
||||||
|
time_start = Clock::now();
|
||||||
|
time_cur = time_start;
|
||||||
}
|
}
|
||||||
if (!paused && !failed)
|
if (!paused && !failed)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user