mirror of
https://github.com/kristoferssolo/maze-ascension.git
synced 2025-10-21 19:20:34 +00:00
36 lines
755 B
Rust
36 lines
755 B
Rust
use std::time::Duration;
|
|
|
|
use bevy::prelude::*;
|
|
|
|
#[derive(Debug, Reflect, Component, PartialEq, Eq)]
|
|
#[reflect(Component)]
|
|
pub enum Hint {
|
|
Movement,
|
|
Interaction,
|
|
}
|
|
|
|
#[derive(Debug, Reflect, Component)]
|
|
#[reflect(Component)]
|
|
pub struct IdleTimer {
|
|
pub timer: Timer,
|
|
pub movement_hint_visible: bool,
|
|
pub interaction_hint_visible: bool,
|
|
}
|
|
|
|
impl IdleTimer {
|
|
pub fn hide_all(&mut self) {
|
|
self.movement_hint_visible = false;
|
|
self.interaction_hint_visible = false;
|
|
}
|
|
}
|
|
|
|
impl Default for IdleTimer {
|
|
fn default() -> Self {
|
|
Self {
|
|
timer: Timer::new(Duration::from_secs(3), TimerMode::Once),
|
|
movement_hint_visible: false,
|
|
interaction_hint_visible: false,
|
|
}
|
|
}
|
|
}
|