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/map.rs | |
parent | 8cdbe7352c4846eb339358bcca6083f747e27721 (diff) |
Diffstat (limited to 'src/map.rs')
-rw-r--r-- | src/map.rs | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,6 +1,6 @@ use ggez::filesystem::File; use ggez::graphics::spritebatch::SpriteBatch; -use ggez::nalgebra::Point2; +use glam; use std::collections::HashMap; use xml::reader::XmlEvent::Characters; @@ -16,7 +16,7 @@ use crate::xmlelements::XMLElements; pub struct Map { dimensions: (usize, usize), layers: Vec<Layer>, - spawns: Vec<(String, Point2<f32>)>, + spawns: Vec<(String, glam::Vec2)>, } impl Operable for Map { @@ -74,7 +74,7 @@ impl Map { fn find_spawn_points( layers: &[Layer], spawn_tiles: HashMap<usize, Tile>, - ) -> Vec<(String, Point2<f32>)> { + ) -> Vec<(String, glam::Vec2)> { let mut spawn_points = Vec::new(); for layer in layers.iter() { @@ -91,7 +91,7 @@ impl Map { spawn_points } - pub fn get_spawn_points(&self, character: Character) -> Vec<Point2<f32>> { + pub fn get_spawn_points(&self, character: Character) -> Vec<glam::Vec2> { self.spawns .clone() .into_iter() |