]> git.localhorst.tv Git - blank.git/blobdiff - src/app/WorldState.hpp
enhanced application state control
[blank.git] / src / app / WorldState.hpp
index 38922ff59c43f2e5dbaa59803ec42ca2fbe339f8..6ab613f85e88634b6dd03bf276964276330a649d 100644 (file)
@@ -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;
+
 };
 
 }