summaryrefslogtreecommitdiff
path: root/src/cell.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/cell.rs')
-rw-r--r--src/cell.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cell.rs b/src/cell.rs
index 6a818c5..7c2385d 100644
--- a/src/cell.rs
+++ b/src/cell.rs
@@ -12,9 +12,9 @@ pub struct AnimationTimer {
}
impl AnimationTimer {
- pub fn from_seconds(duration: f32, repeating: bool) -> AnimationTimer {
+ pub fn from_seconds(duration: f32, mode: TimerMode) -> AnimationTimer {
AnimationTimer {
- timer: Timer::from_seconds(duration, repeating),
+ timer: Timer::from_seconds(duration, mode),
}
}
@@ -39,7 +39,7 @@ impl AnimationTimer {
}
pub fn repeating(&self) -> bool {
- self.timer.repeating()
+ self.timer.mode() == TimerMode::Repeating
}
}
@@ -139,7 +139,7 @@ pub fn start_explosion(
if cell.occupant == Occupant::Explosion {
commands
.entity(entity)
- .insert(AnimationTimer::from_seconds(0.1, true));
+ .insert(AnimationTimer::from_seconds(0.1, TimerMode::Repeating));
}
}
}