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
|
|
|
|
2018-01-01 04:14:01 +01:00
|
|
|
void enter() override;
|
2014-06-06 13:18:32 +02:00
|
|
|
|
2018-01-01 04:14:01 +01:00
|
|
|
void exit() override;
|
2014-06-06 13:18:32 +02:00
|
|
|
|
2018-01-01 04:14:01 +01:00
|
|
|
void tick(float dt) override;
|
2014-06-06 13:18:32 +02:00
|
|
|
|
2018-01-01 04:14:01 +01:00
|
|
|
void draw(GameRenderer* r) override;
|
2015-04-03 02:26:20 +02:00
|
|
|
|
2018-01-01 04:14:01 +01:00
|
|
|
bool shouldWorldUpdate() override;
|
|
|
|
|
|
|
|
void handleEvent(const SDL_Event& event) override;
|
2014-06-06 13:18:32 +02:00
|
|
|
};
|
|
|
|
|
2016-09-09 22:13:20 +02:00
|
|
|
#endif // LOADINGSTATE_HPP
|