[WIP] Supermath101's work on the player and controls#3
Conversation
| .add_system_set( | ||
| SystemSet::on_enter(GameState::Playing).with_system(singleplayer_setup), | ||
| SystemSet::on_enter(GameState::Playing) | ||
| .with_system(singleplayer_setup.label("2d_map_setup")) |
There was a problem hiding this comment.
This and the next line is a hacky way to integrate the singleplayer and player crates together. Does anybody have a better idea?
There was a problem hiding this comment.
I think this is fine. Alternatively you can create a single setup system and from there call the create map and create player fns but then you would need to pass in the system params.
| use bevy_egui::EguiPlugin; | ||
|
|
||
| mod menus; | ||
| mod player; |
There was a problem hiding this comment.
I would move this at least for the time being into the singleplayer crate (it's unlikely we will have multiplayer within the frame of this jam).
| @@ -1,12 +1,16 @@ | |||
| //! Some UI utility functions and structs. | |||
There was a problem hiding this comment.
This comment doesn't really add anything useful (it's clear what the statement does already), would recommend removing
| @@ -0,0 +1,41 @@ | |||
| use bevy::prelude::*; | |||
There was a problem hiding this comment.
As mentioned before I would move this into singleplayer and rename it to player.rs as it probably won't need its own folder
| }); | ||
| } | ||
|
|
||
| pub fn cleanup_player(mut commands: Commands, query: Query<Entity, With<Player>>) { |
There was a problem hiding this comment.
this is probably not necessary - full scene transitions can just despawn everything. In player death scenarios, the systems that detect/cause them would likely despawn the player themselves
| .add_system_set( | ||
| SystemSet::on_enter(GameState::Playing).with_system(singleplayer_setup), | ||
| SystemSet::on_enter(GameState::Playing) | ||
| .with_system(singleplayer_setup.label("2d_map_setup")) |
There was a problem hiding this comment.
I think this is fine. Alternatively you can create a single setup system and from there call the create map and create player fns but then you would need to pass in the system params.
Still working on completing the controls.Player controls is now in an MVP state.