summaryrefslogtreecommitdiff
path: root/src/tileset.rs
diff options
context:
space:
mode:
authortom barrett <spalf0@gmail.com>2019-06-28 10:05:13 -0500
committertom barrett <spalf0@gmail.com>2019-06-28 10:05:13 -0500
commit7d59cd2510ac926edd0790de4bffb0fbb9c60e7c (patch)
tree5b17c70031f57de3ba0f663018fdc41bad31f953 /src/tileset.rs
parent39ea81bea4a61baf8c95a33bcc979b0e65ce660e (diff)
animation working
Diffstat (limited to 'src/tileset.rs')
-rw-r--r--src/tileset.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tileset.rs b/src/tileset.rs
index eb097e5..45d68a3 100644
--- a/src/tileset.rs
+++ b/src/tileset.rs
@@ -81,13 +81,13 @@ impl Tileset {
}
}
- pub fn get_rect_by_entity(&self, entity: &str) -> Rect {
+ pub fn get_tile_by_entity_keyframe(&self, entity: &str, keyframe: usize) -> Rect {
*self
.tiles
.get(
self.properties
.iter()
- .find(|(_, p)| p.entity == entity && 0 == p.keyframe)
+ .find(|(_, p)| p.entity == entity && keyframe == p.keyframe)
.unwrap()
.0,
)