blob: ff34f97a8fc149e412f7ab6a9ad6b756e5739771 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#pragma once
#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(float dt);
void render(RenderCallback* renderCallback, Vec2F const& position);
void renderLightSources(RenderCallback* renderCallback);
private:
World* m_world;
Json m_config;
bool m_deploying;
bool m_deployed;
LuaAnimationComponent<LuaMessageHandlingComponent<LuaStorableComponent<LuaUpdatableComponent<LuaWorldComponent<LuaBaseComponent>>>>> m_scriptComponent;
};
}
|