diff options
author | tom barrett <spalf0@gmail.com> | 2019-06-27 03:31:33 -0500 |
---|---|---|
committer | tom barrett <spalf0@gmail.com> | 2019-06-27 03:31:33 -0500 |
commit | ee8d055be8326eb1561900bcca6acd9e38071f4a (patch) | |
tree | adc6da1976866de4b3bf436f99e6eac673af2df3 /src/layer.rs | |
parent | f7bbf5646c8220bca2fbd9451d5c234049cf9225 (diff) |
tiles can now animate
Diffstat (limited to 'src/layer.rs')
-rw-r--r-- | src/layer.rs | 6 |
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); |