diff options
author | tom barrett <spalf0@gmail.com> | 2019-08-19 02:26:17 -0500 |
---|---|---|
committer | tom barrett <spalf0@gmail.com> | 2019-08-19 02:26:17 -0500 |
commit | ebf13bcd8e8ab799c56961e6bc1779bd8031a8dc (patch) | |
tree | 914274f75890fb754e698be2b06a8b2a2ef9b1d1 /src/map.rs | |
parent | 7d2c0954cd95bdabcb7ecf26f9225382ab078289 (diff) |
created abstraction between world and game, added temlate for dialogtrees
Diffstat (limited to 'src/map.rs')
-rw-r--r-- | src/map.rs | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -7,6 +7,7 @@ use xml::reader::XmlEvent::Characters; use crate::constants; use crate::entity::Operable; use crate::layer::Layer; +use crate::npc::Character; use crate::tile::Tile; use crate::tileset::Tileset; use crate::xmlelements::XMLElements; @@ -90,11 +91,11 @@ impl Map { spawn_points } - pub fn get_spawn_points(&self, name: &str) -> Vec<Point2<f32>> { + pub fn get_spawn_points(&self, character: Character) -> Vec<Point2<f32>> { self.spawns .clone() .into_iter() - .filter(|s| s.0 == name) + .filter(|s| s.0 == character.to_str()) .map(|s| s.1) .collect() } |