2014-08-11 18:58:43 +02:00
|
|
|
#ifndef LOADINGSTATE_HPP
|
2014-06-06 13:18:32 +02:00
|
|
|
#define LOADINGSTATE_HPP
|
2016-10-17 00:56:51 +02:00
|
|
|
#include "StateManager.hpp"
|
2014-06-06 13:18:32 +02:00
|
|
|
|
2016-10-17 00:56:51 +02:00
|
|
|
#include <functional>
|
2014-06-06 13:18:32 +02:00
|
|
|
|
2016-09-09 22:13:20 +02:00
|
|
|
class LoadingState : public State {
|
2016-10-17 00:56:51 +02:00
|
|
|
std::function<void(void)> complete;
|
2016-09-09 22:13:20 +02:00
|
|
|
|
2014-06-06 13:18:32 +02:00
|
|
|
public:
|
2016-10-17 00:56:51 +02:00
|
|
|
LoadingState(RWGame* game, std::function<void(void)> callback);
|
2016-09-09 22:13:20 +02:00
|
|
|
|
|
|
|
virtual void enter();
|
|
|
|
virtual void exit();
|
2014-06-06 13:18:32 +02:00
|
|
|
|
2016-09-09 22:13:20 +02:00
|
|
|
virtual void tick(float dt);
|
2014-06-06 13:18:32 +02:00
|
|
|
|
2016-09-09 22:13:20 +02:00
|
|
|
virtual void draw(GameRenderer* r);
|
2014-06-06 13:18:32 +02:00
|
|
|
|
2015-04-03 16:38:24 +02:00
|
|
|
virtual bool shouldWorldUpdate();
|
2015-04-03 02:26:20 +02:00
|
|
|
|
2016-09-09 22:13:20 +02:00
|
|
|
virtual void handleEvent(const SDL_Event& event);
|
2014-06-06 13:18:32 +02:00
|
|
|
};
|
|
|
|
|
2016-09-09 22:13:20 +02:00
|
|
|
#endif // LOADINGSTATE_HPP
|