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/entity.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/entity.rs') diff --git a/src/entity.rs b/src/entity.rs index f3ca328..ffe32b5 100644 --- a/src/entity.rs +++ b/src/entity.rs @@ -1,5 +1,5 @@ use ggez::graphics::spritebatch::SpriteBatch; -use ggez::nalgebra::Point2; +use glam; use crate::constants; @@ -10,14 +10,14 @@ pub trait Operable { #[derive(Debug, Clone)] pub struct Entity { - pub position: Point2, - pub spawn: Point2, + pub position: glam::Vec2, + pub spawn: glam::Vec2, pub action: Action, map_dimensions: (f32, f32), } impl Entity { - pub fn new(spawn: Point2, map_dimensions: (f32, f32)) -> Entity { + pub fn new(spawn: glam::Vec2, map_dimensions: (f32, f32)) -> Entity { Entity { spawn, action: Action::IdleLeft, -- cgit v1.2.3