diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-20 14:33:09 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-20 14:33:09 +1000 |
commit | 6352e8e3196f78388b6c771073f9e03eaa612673 (patch) | |
tree | e23772f79a7fbc41bc9108951e9e136857484bf4 /source/game/StarPlayerDeployment.hpp | |
parent | 6741a057e5639280d85d0f88ba26f000baa58f61 (diff) |
everything everywhere
all at once
Diffstat (limited to 'source/game/StarPlayerDeployment.hpp')
-rw-r--r-- | source/game/StarPlayerDeployment.hpp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/source/game/StarPlayerDeployment.hpp b/source/game/StarPlayerDeployment.hpp new file mode 100644 index 0000000..a5c8e3b --- /dev/null +++ b/source/game/StarPlayerDeployment.hpp @@ -0,0 +1,46 @@ +#ifndef STAR_PLAYER_DEPLOYMENT_HPP +#define STAR_PLAYER_DEPLOYMENT_HPP + +#include "StarLuaComponents.hpp" +#include "StarLuaAnimationComponent.hpp" +#include "StarWorld.hpp" + +namespace Star { + +STAR_CLASS(RenderCallback); + +STAR_CLASS(PlayerDeployment); + +class PlayerDeployment { +public: + PlayerDeployment(Json const& config); + + void diskLoad(Json const& diskStore); + Json diskStore() const; + + bool canDeploy(); + void setDeploying(bool deploying); + bool isDeploying() const; + bool isDeployed() const; + + void init(Entity* player, World* world); + void uninit(); + + void teleportOut(); + Maybe<Json> receiveMessage(String const& message, bool localMessage, JsonArray const& args = {}); + void update(); + + void render(RenderCallback* renderCallback, Vec2F const& position); + +private: + World* m_world; + Json m_config; + + bool m_deploying; + bool m_deployed; + LuaAnimationComponent<LuaMessageHandlingComponent<LuaStorableComponent<LuaUpdatableComponent<LuaWorldComponent<LuaBaseComponent>>>>> m_scriptComponent; +}; + +} + +#endif |