namespace battle {
-void SelectMoveAction::EnterState(Application &c, SDL_Surface *screen) {
- ctrl = &c;
+void SelectMoveAction::OnEnterState(SDL_Surface *screen) {
+
}
-void SelectMoveAction::ExitState(Application &c, SDL_Surface *screen) {
- ctrl = 0;
+void SelectMoveAction::OnExitState(SDL_Surface *screen) {
+
}
-void SelectMoveAction::ResumeState(Application &ctrl, SDL_Surface *screen) {
+void SelectMoveAction::OnResumeState(SDL_Surface *screen) {
}
-void SelectMoveAction::PauseState(Application &ctrl, SDL_Surface *screen) {
+void SelectMoveAction::OnPauseState(SDL_Surface *screen) {
}
-void SelectMoveAction::Resize(int width, int height) {
+void SelectMoveAction::OnResize(int width, int height) {
}
if (input.JustPressed(Input::ACTION_A)) {
switch (battle->GetMoveMenu().Selected()) {
case MoveMenu::ATTACK:
- ctrl->ChangeState(new SelectAttackType(battle));
+ Ctrl().ChangeState(new SelectAttackType(battle));
battle->NextHero();
break;
case MoveMenu::CHANGE:
- ctrl->PushState(new SwapHeroes(battle, this));
+ Ctrl().PushState(new SwapHeroes(battle, this));
break;
case MoveMenu::RUN:
- ctrl->ChangeState(new RunState(battle));
+ Ctrl().ChangeState(new RunState(battle));
break;
}
}