X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp%2FWorldState.hpp;h=6ab613f85e88634b6dd03bf276964276330a649d;hb=f5e5e8522b94a6b81a137d4bca7665ef15bcd2c6;hp=38922ff59c43f2e5dbaa59803ec42ca2fbe339f8;hpb=afd253b2dd10fdf2d4655d3d4a5766e6aa8c1a2c;p=blank.git diff --git a/src/app/WorldState.hpp b/src/app/WorldState.hpp index 38922ff..6ab613f 100644 --- a/src/app/WorldState.hpp +++ b/src/app/WorldState.hpp @@ -1,7 +1,9 @@ #ifndef BLANK_APP_WORLDSTATE_HPP_ #define BLANK_APP_WORLDSTATE_HPP_ +#include "PreloadState.hpp" #include "State.hpp" +#include "UnloadState.hpp" #include "../ai/Spawner.hpp" #include "../ui/Interface.hpp" #include "../world/World.hpp" @@ -18,19 +20,27 @@ public: WorldState( Environment &, const Interface::Config &, - const World::Config & + const World::Config &, + const WorldSave & ); + void OnEnter() override; + void Handle(const SDL_Event &) override; void Update(int dt) override; void Render(Viewport &) override; + World &GetWorld() noexcept { return world; } + private: Environment &env; World world; Spawner spawner; Interface interface; + PreloadState preload; + UnloadState unload; + }; }