namespace battle {
-void RunState::EnterState(Application &c, SDL_Surface *screen) {
- ctrl = &c;
- // TODO: push battle animation if enemy is faster
+void RunState::OnEnterState(SDL_Surface *screen) {
+
}
-void RunState::ExitState(Application &c, SDL_Surface *screen) {
- ctrl = 0;
+void RunState::OnExitState(SDL_Surface *screen) {
+
}
-void RunState::ResumeState(Application &ctrl, SDL_Surface *screen) {
+void RunState::OnResumeState(SDL_Surface *screen) {
timer = GraphicsTimers().StartCountdown(2500);
}
-void RunState::PauseState(Application &ctrl, SDL_Surface *screen) {
+void RunState::OnPauseState(SDL_Surface *screen) {
}
-void RunState::Resize(int width, int height) {
+void RunState::OnResize(int width, int height) {
}
void RunState::HandleEvents(const Input &input) {
if (timer.Finished()) {
battle->SetRunaway();
- ctrl->PopState(); // pop self
+ Ctrl().PopState(); // pop self
}
}