summaryrefslogtreecommitdiff
path: root/src/animations.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/animations.rs')
-rw-r--r--src/animations.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/animations.rs b/src/animations.rs
index 5e5740a..be10f31 100644
--- a/src/animations.rs
+++ b/src/animations.rs
@@ -5,7 +5,8 @@ use std::time::Instant;
use crate::constants;
use crate::entity::Action;
-use crate::tileset::{Tile, Tileset};
+use crate::tile::Tile;
+use crate::tileset::Tileset;
#[derive(Debug, Clone, PartialEq)]
pub struct Animation {
@@ -29,7 +30,7 @@ impl Animation {
pub fn update(&mut self) {
if let Some(mut i) = self.frames.iter().position(|a| a == &self.current) {
- if let Some(delay) = self.current.property.delay {
+ if let Some(delay) = self.current.properties.delay {
if self.timer.elapsed().as_millis() > delay as u128 {
i = if i == self.frames.len() - 1 { 0 } else { i + 1 };
self.current = self.frames[i].clone();