A bit more cleaning up of the gui and fsm, probaby done.
This commit is contained in:
parent
dd4f77a106
commit
6c1d851e85
3 changed files with 12 additions and 5 deletions
|
@ -77,8 +77,8 @@ namespace gui {
|
|||
|
||||
void FSM::MOVING(Event ) {
|
||||
// this should be an optional that returns a point
|
||||
if($main_ui.play_move()) {
|
||||
System::plan_motion(*$level.world, {size_t($main_ui.$camera.target_x), size_t($main_ui.$camera.target_y)});
|
||||
if(auto move_to = $main_ui.play_move()) {
|
||||
System::plan_motion(*$level.world, *move_to);
|
||||
run_systems();
|
||||
state(State::IDLE);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue