mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-09 12:22:34 +01:00
6a7802de87
Removed raw State pointers in favour of unique_ptrs Avoid allowing control flow to re-enter States that have exited Defer releasing states until the end of the frame
26 lines
508 B
C++
26 lines
508 B
C++
#ifndef LOADINGSTATE_HPP
|
|
#define LOADINGSTATE_HPP
|
|
#include "StateManager.hpp"
|
|
|
|
#include <functional>
|
|
|
|
class LoadingState : public State {
|
|
std::function<void(void)> complete;
|
|
|
|
public:
|
|
LoadingState(RWGame* game, std::function<void(void)> callback);
|
|
|
|
virtual void enter();
|
|
virtual void exit();
|
|
|
|
virtual void tick(float dt);
|
|
|
|
virtual void draw(GameRenderer* r);
|
|
|
|
virtual bool shouldWorldUpdate();
|
|
|
|
virtual void handleEvent(const SDL_Event& event);
|
|
};
|
|
|
|
#endif // LOADINGSTATE_HPP
|