|
|
|
@ -73,6 +73,8 @@ void State_OverworldMap::OnStateChange(GameState*prevState){ |
|
|
|
|
Menu::OpenMenu(OVERWORLD_LEVEL_SELECT,false); |
|
|
|
|
}; |
|
|
|
|
void State_OverworldMap::OnUserUpdate(Crawler*game){ |
|
|
|
|
if(Menu::stack.size()>1)return; |
|
|
|
|
|
|
|
|
|
game->camera.SetTarget(currentConnectionPoint->rect.middle()+vf2d{game->GetScreenSize().x/6.0f,0}); |
|
|
|
|
game->UpdateCamera(game->GetElapsedTime()); |
|
|
|
|
game->GetPlayer()->Update(game->GetElapsedTime()); |
|
|
|
@ -85,7 +87,7 @@ void State_OverworldMap::OnUserUpdate(Crawler*game){ |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(Crawler::KEY_MENU.Pressed()){ |
|
|
|
|
if(Menu::stack.size()==1&&Crawler::KEY_MENU.Pressed()){ |
|
|
|
|
Menu::OpenMenu(OVERWORLD_MENU); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|