#include "MainMenuMultiSelectAIState.h" #include "MultiplayerGameState.h" void MainMenuMultiSelectAIState::OnAwake() { } void MainMenuMultiSelectAIState::OnSleep() { } PushdownState::PushdownResult MainMenuMultiSelectAIState::OnUpdate(float dt, PushdownState** pushFunc) { mainMenuAI->UpdateMainMenu(dt); if (Window::GetKeyboard()->KeyPressed(KeyboardKeys::RETURN)) { switch (mainMenuAI->GetSelected()) { case MainMenuAIOption::One: { *pushFunc = new MultiplayerGameState(1); return PushdownState::PushdownResult::Push; } case MainMenuAIOption::Two: { //*pushFunc = new MultiplayerGameState(); *pushFunc = new MultiplayerGameState(2); return PushdownState::PushdownResult::Push; // TO:DO } case MainMenuAIOption::Three: { //*pushFunc = new MultiplayerGameState(); *pushFunc = new MultiplayerGameState(3); return PushdownState::PushdownResult::Push; // TO:DO } case MainMenuAIOption::BacktoMainMenu: { return PushdownState::PushdownResult::Pop; } } } if (Window::GetKeyboard()->KeyPressed(KeyboardKeys::ESCAPE)) { return PushdownState::PushdownResult::Pop; } return PushdownState::PushdownResult::NoChange; } //One, Two, Three