Walk animation controller now applied to the overworld map stage.

This commit is contained in:
2023-10-29 17:30:09 -05:00
parent c065e9f6fb
commit 42f8e25cdf
6 changed files with 12 additions and 5 deletions
+4 -1
View File
@@ -11,14 +11,17 @@ std::vector<ConnectionPoint>State_OverworldMap::connections;
State_OverworldMap::State_OverworldMap(){
SetStageMarker("Stage I-I"); //Eventually we will load the game from a file and this will not be necessary. We just set it to this for now.
game->GetPlayer()->SetPos(currentConnectionPoint->rect.pos);
}
void State_OverworldMap::OnStateChange(GameState*prevState){
Menu::CloseAllMenus();
game->GetPlayer()->SetPos(currentConnectionPoint->rect.pos);
game->GetPlayer()->UpdateWalkingAnimation(DOWN);
game->GetPlayer()->SetState(State::FORCE_WALK);
};
void State_OverworldMap::OnUserUpdate(Crawler*game){
game->camera.SetTarget(currentConnectionPoint->rect.middle());
game->UpdateCamera(game->GetElapsedTime());
game->GetPlayer()->Update(game->GetElapsedTime());
};
void State_OverworldMap::Draw(Crawler*game){