From ceb3eff116f9ddf8dcb71a0a77efb63531f75ab2 Mon Sep 17 00:00:00 2001 From: Tom Barrett Date: Wed, 2 Feb 2022 19:08:44 +0100 Subject: 2022 update --- src/cell.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/cell.rs') 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, + 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, ); -- cgit v1.2.3