diff options
Diffstat (limited to 'src/systems/controlinput.rs')
| -rw-r--r-- | src/systems/controlinput.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/systems/controlinput.rs b/src/systems/controlinput.rs index 712c98b..0771b1e 100644 --- a/src/systems/controlinput.rs +++ b/src/systems/controlinput.rs @@ -14,7 +14,11 @@ use specs::{ use crate::components::{Controller, Player, Removed}; use crate::controls::{Control, Action}; use crate::resources::{Input, NewEntities, Spawn}; +use crate::hashmap; +use crate::template::Template; +use crate::parameter::Parameter; +// use crate::assemblages::Player; pub struct ControlInput; @@ -44,9 +48,9 @@ impl <'a> System<'a> for ControlInput { for action in &input.actions { match action { Action::Join(name) => { - new.ents.push(( + new.templates.push(( spawn.pos, - crate::player::make_player(name) + Template::new("player", hashmap!("name".to_string() => Parameter::String(name.to_string()))) )); } Action::Leave(name) => {leaving.insert(name);} |
