summaryrefslogtreecommitdiff
path: root/src/player.rs
diff options
context:
space:
mode:
authorTom Barrett <tom@tombarrett.xyz>2022-02-02 19:08:44 +0100
committerTom Barrett <tom@tombarrett.xyz>2022-02-02 19:08:44 +0100
commitceb3eff116f9ddf8dcb71a0a77efb63531f75ab2 (patch)
treec818ad7241797fa72e0cb802f09c9a1b296e1fb0 /src/player.rs
parent8cdbe7352c4846eb339358bcca6083f747e27721 (diff)
2022 updateHEADmaster
Diffstat (limited to 'src/player.rs')
-rw-r--r--src/player.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/player.rs b/src/player.rs
index 7df0922..722c98e 100644
--- a/src/player.rs
+++ b/src/player.rs
@@ -1,6 +1,6 @@
use ggez::event::KeyCode;
use ggez::graphics::spritebatch::SpriteBatch;
-use ggez::nalgebra::Point2;
+use glam;
use crate::animations::Animations;
use crate::entity::{Action, Entity, Operable};
@@ -24,14 +24,14 @@ impl Operable for Player {
}
impl Player {
- pub fn new(tileset: &Tileset, spawn: Point2<f32>, map_dimensions: (f32, f32)) -> Player {
+ pub fn new(tileset: &Tileset, spawn: glam::Vec2, map_dimensions: (f32, f32)) -> Player {
Player {
entity: Entity::new(spawn, map_dimensions),
animations: Animations::new(tileset),
}
}
- pub fn get_position(&self) -> Point2<f32> {
+ pub fn get_position(&self) -> glam::Vec2 {
self.entity.position
}