|
|
|
@ -1397,13 +1397,21 @@ fn animate_title_light_in(
|
|
|
|
mut t: Local<Timer>,
|
|
|
|
mut t: Local<Timer>,
|
|
|
|
mut started: Local<bool>,
|
|
|
|
mut started: Local<bool>,
|
|
|
|
time: Res<Time>,
|
|
|
|
time: Res<Time>,
|
|
|
|
|
|
|
|
keys: Res<ButtonInput<KeyCode>>,
|
|
|
|
|
|
|
|
mouse: Res<ButtonInput<MouseButton>>,
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
// Over 6 seconds, fade in to 600 intensity
|
|
|
|
// Over 6 seconds, fade in to 600 intensity
|
|
|
|
if !(*started) {
|
|
|
|
if !(*started) {
|
|
|
|
*t = Timer::from_seconds(6.0, TimerMode::Once);
|
|
|
|
*t = Timer::from_seconds(6.0, TimerMode::Once);
|
|
|
|
*started = true
|
|
|
|
*started = true
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
t.tick(time.delta());
|
|
|
|
let skip = keys.just_pressed(KeyCode::Enter) || mouse.just_pressed(MouseButton::Left);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if skip {
|
|
|
|
|
|
|
|
t.tick(Duration::from_secs(6));
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
t.tick(time.delta());
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
info!("Spotlight in");
|
|
|
|
info!("Spotlight in");
|
|
|
|
@ -1431,13 +1439,21 @@ fn animate_title_light_out(
|
|
|
|
mut t: Local<Timer>,
|
|
|
|
mut t: Local<Timer>,
|
|
|
|
mut started: Local<bool>,
|
|
|
|
mut started: Local<bool>,
|
|
|
|
time: Res<Time>,
|
|
|
|
time: Res<Time>,
|
|
|
|
|
|
|
|
keys: Res<ButtonInput<KeyCode>>,
|
|
|
|
|
|
|
|
mouse: Res<ButtonInput<MouseButton>>,
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
// Over 6 seconds, fade in to 600 intensity
|
|
|
|
// Over 6 seconds, fade in to 600 intensity
|
|
|
|
if !(*started) {
|
|
|
|
if !(*started) {
|
|
|
|
*t = Timer::from_seconds(3.0, TimerMode::Once);
|
|
|
|
*t = Timer::from_seconds(3.0, TimerMode::Once);
|
|
|
|
*started = true
|
|
|
|
*started = true
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
t.tick(time.delta());
|
|
|
|
let skip = keys.just_pressed(KeyCode::Enter) || mouse.just_pressed(MouseButton::Left);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if skip {
|
|
|
|
|
|
|
|
t.tick(Duration::from_secs(3));
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
t.tick(time.delta());
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
info!("Spotlight out");
|
|
|
|
info!("Spotlight out");
|
|
|
|
|