summaryrefslogtreecommitdiff
path: root/src/cell.rs
diff options
context:
space:
mode:
authorTom Barrett <tom@tombarrett.xyz>2022-11-17 21:15:30 +0100
committerTom Barrett <tom@tombarrett.xyz>2022-11-17 21:15:30 +0100
commitff2f897520704adacc8287b3499167bbcf56deb8 (patch)
tree103ecd27cf2f2d7532471c99586878682c73650f /src/cell.rs
parentcd606702b4cc73119e8472ff2b006a3f13687d9c (diff)
for version 9
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));
}
}
}