diff options
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, ); |