fixed timer
This commit is contained in:
parent
dea7984e2e
commit
8dded8c4ba
@ -86,6 +86,13 @@ impl Action<Scenes, ScreenError, GameContext> for LevelSelectScreen {
|
|||||||
.send(Some(ControlFlag::SwitchLevel(level)))
|
.send(Some(ControlFlag::SwitchLevel(level)))
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
|
context
|
||||||
|
.flag_send
|
||||||
|
.send(Some(ControlFlag::UpdateLevelStart(
|
||||||
|
Utc::now(),
|
||||||
|
)))
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
// Enter the game
|
// Enter the game
|
||||||
Ok(ActionFlag::SwitchState(Scenes::InGameScene))
|
Ok(ActionFlag::SwitchState(Scenes::InGameScene))
|
||||||
} else if self.is_btm_pressed {
|
} else if self.is_btm_pressed {
|
||||||
|
@ -323,7 +323,7 @@ impl ScreenSpaceRender for MainMenuScreen {
|
|||||||
for (i, (level, time)) in times.iter() {
|
for (i, (level, time)) in times.iter() {
|
||||||
let time = Duration::seconds(*time);
|
let time = Duration::seconds(*time);
|
||||||
raylib.draw_text(
|
raylib.draw_text(
|
||||||
&format!("Lvl {} {}:{}", level + 1, time.num_minutes(), time.num_seconds() % 60),
|
&format!("Lvl {} {}:{}", level, time.num_minutes(), time.num_seconds() % 60),
|
||||||
screen_size.x as i32 - 200,
|
screen_size.x as i32 - 200,
|
||||||
100 + (25 * (*i as i32)),
|
100 + (25 * (*i as i32)),
|
||||||
20,
|
20,
|
||||||
@ -333,6 +333,5 @@ impl ScreenSpaceRender for MainMenuScreen {
|
|||||||
}
|
}
|
||||||
self.is_quit_pressed = mouse_pressed && hovering_quit;
|
self.is_quit_pressed = mouse_pressed && hovering_quit;
|
||||||
|
|
||||||
// for
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user