diff options
author | Tom Barrett <tom@tombarrett.xyz> | 2022-02-02 19:08:44 +0100 |
---|---|---|
committer | Tom Barrett <tom@tombarrett.xyz> | 2022-02-02 19:08:44 +0100 |
commit | ceb3eff116f9ddf8dcb71a0a77efb63531f75ab2 (patch) | |
tree | c818ad7241797fa72e0cb802f09c9a1b296e1fb0 /src/cell.rs | |
parent | 8cdbe7352c4846eb339358bcca6083f747e27721 (diff) |
Diffstat (limited to 'src/cell.rs')
-rw-r--r-- | src/cell.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cell.rs b/src/cell.rs index bce744b..db99edd 100644 --- a/src/cell.rs +++ b/src/cell.rs @@ -1,5 +1,5 @@ use ggez::graphics::spritebatch::SpriteBatch; -use ggez::nalgebra::Point2; +use glam; use crate::animations::Animation; use crate::constants; @@ -9,7 +9,7 @@ use crate::tileset::Tileset; #[derive(Debug, Clone)] pub struct Cell { pub id: usize, - pub destination: Point2<f32>, + pub destination: glam::Vec2, animation: Animation, } @@ -31,7 +31,7 @@ impl Cell { let y = (i as f32 / dimensions.1 as f32).floor(); let offset = (constants::TILE_WIDTH / 2.0) * constants::TILE_SCALE; - let destination = Point2::new( + let destination = glam::Vec2::new( (constants::TILE_WIDTH * constants::TILE_SCALE * x) + offset, (constants::TILE_HEIGHT * constants::TILE_SCALE * y) + offset, ); |