summaryrefslogtreecommitdiff
path: root/src/layer.rs
diff options
context:
space:
mode:
authortom barrett <spalf0@gmail.com>2019-06-27 03:31:33 -0500
committertom barrett <spalf0@gmail.com>2019-06-27 03:31:33 -0500
commitee8d055be8326eb1561900bcca6acd9e38071f4a (patch)
treeadc6da1976866de4b3bf436f99e6eac673af2df3 /src/layer.rs
parentf7bbf5646c8220bca2fbd9451d5c234049cf9225 (diff)
tiles can now animate
Diffstat (limited to 'src/layer.rs')
-rw-r--r--src/layer.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/layer.rs b/src/layer.rs
index efecd89..c9f32e8 100644
--- a/src/layer.rs
+++ b/src/layer.rs
@@ -23,6 +23,12 @@ impl Layer {
}
}
+ pub fn update(&mut self) {
+ for tile in self.tiles.iter_mut() {
+ tile.update();
+ }
+ }
+
pub fn draw(&self, spritebatch: &mut SpriteBatch) {
for tile in self.tiles.iter() {
tile.draw(spritebatch);