Tramway SDK
entities.h
Go to the documentation of this file.
1// TRAMWAY DRIFT AND DUNGEON EXPLORATION SIMULATOR 2022
2// All rights reserved.
3
4#ifndef TRAM_SDK_EXTENSIONS_DESIGN_ENTITIES_H
5#define TRAM_SDK_EXTENSIONS_DESIGN_ENTITIES_H
6
7#include <framework/entity.h>
10
11namespace tram {
12 class RenderComponent;
13 class PhysicsComponent;
14}
15
16namespace tram::Ext::Design {
17
18class Button : public Entity {
19public:
20 Button(const SharedEntityData&, const ValueArray&);
21 void UpdateParameters(); void SetParameters();
22 void Load(); void Unload(); void Serialize();
23 void Update(); void MessageHandler(Message& msg);
25 static void Register();
26protected:
29
30 void SwitchState(int);
31
32 uint32_t flags;
37 float speed;
38 float pause;
39 float distance;
42
45
46 float progress;
47 float timer;
48 int state;
50};
51
52class Decoration : public Entity {
53public:
56 void Load(); void Unload(); void Serialize();
58 static void Register();
59protected:
62
65};
66
67
68class Breakable : public Entity {
69public:
72 void Load(); void Unload(); void Serialize();
74 static void Register();
75protected:
78
81};
82
83class Water : public Entity {
84public:
87 void Load(); void Unload(); void Serialize();
89 static void Register();
90protected:
93
96};
97
98class Train : public Entity {
99public:
102 void Load(); void Unload(); void Serialize();
104 static void Register();
105protected:
108
111};
112
113class Pickup : public Entity {
114public:
117 void Load(); void Unload(); void Serialize();
119 static void Register();
120protected:
123
126};
127
128class DebugText : public Entity {
129public:
132 void Load(); void Unload(); void Serialize();
134 static void Register();
135protected:
138
141};
142
143class DebugShape : public Entity {
144public:
147 void Load(); void Unload(); void Serialize();
149 static void Register();
150protected:
153
156};
157
158class TriggerAutosave : public Entity {
159public:
162 void Load(); void Unload(); void Serialize();
164 static void Register();
165protected:
168
171};
172
173class TriggerHurt : public Entity {
174public:
177 void Load(); void Unload(); void Serialize();
179 static void Register();
180protected:
183
186};
187
188class TriggerOnce : public Entity {
189public:
192 void Load(); void Unload(); void Serialize();
194 static void Register();
195protected:
198
201};
202
203class TriggerMultiple : public Entity {
204public:
207 void Load(); void Unload(); void Serialize();
209 static void Register();
210protected:
213
216};
217
218class TriggerPush : public Entity {
219public:
222 void Load(); void Unload(); void Serialize();
224 static void Register();
225protected:
228
231};
232
233class TriggerRemove : public Entity {
234public:
237 void Load(); void Unload(); void Serialize();
239 static void Register();
240protected:
243
246};
247
248class TriggerTeleport : public Entity {
249public:
252 void Load(); void Unload(); void Serialize();
254 static void Register();
255protected:
258
261};
262
264public:
267 void Load(); void Unload(); void Serialize();
269 static void Register();
270protected:
273
276};
277
278}
279
280#endif // TRAM_SDK_EXTENSIONS_DESIGN_ENTITIES_H
Wrapper for an EntityComponent pointer.
Definition: entitycomponent.h:53
Definition: entity.h:20
Definition: entities.h:68
name_t collmodel
Definition: entities.h:80
name_t model
Definition: entities.h:79
Component< RenderComponent > rendercomponent
Definition: entities.h:76
Breakable(const SharedEntityData &, const ValueArray &)
Component< PhysicsComponent > physicscomponent
Definition: entities.h:77
void MessageHandler(Message &msg)
Definition: entities.h:18
void Serialize()
Definition: entities.cpp:219
float progress
Definition: entities.h:46
quat start_rot
Definition: entities.h:44
vec3 origin
Definition: entities.h:35
vec3 start_pos
Definition: entities.h:43
float pause
Definition: entities.h:38
Button(const SharedEntityData &, const ValueArray &)
Definition: entities.cpp:107
uint32_t flags
Definition: entities.h:32
void MessageHandler(Message &msg)
Definition: entities.cpp:299
void Unload()
Definition: entities.cpp:210
name_t parent
Definition: entities.h:41
int last_activate
Definition: entities.h:49
vec3 direction
Definition: entities.h:36
void Load()
Definition: entities.cpp:187
name_t GetType()
Definition: entities.cpp:103
Component< PhysicsComponent > physicscomponent
Definition: entities.h:28
float speed
Definition: entities.h:37
name_t lightmap
Definition: entities.h:34
void Update()
Definition: entities.cpp:225
float distance
Definition: entities.h:39
static void Register()
Definition: entities.cpp:93
void UpdateParameters()
Definition: entities.cpp:145
Component< RenderComponent > rendercomponent
Definition: entities.h:27
name_t sound
Definition: entities.h:40
int state
Definition: entities.h:48
name_t model
Definition: entities.h:33
float timer
Definition: entities.h:47
void SetParameters()
Definition: entities.cpp:182
Definition: entities.h:143
Component< PhysicsComponent > physicscomponent
Definition: entities.h:152
name_t collmodel
Definition: entities.h:155
void MessageHandler(Message &msg)
Component< RenderComponent > rendercomponent
Definition: entities.h:151
name_t model
Definition: entities.h:154
DebugShape(const SharedEntityData &, const ValueArray &)
Definition: entities.h:128
Component< PhysicsComponent > physicscomponent
Definition: entities.h:137
Component< RenderComponent > rendercomponent
Definition: entities.h:136
DebugText(const SharedEntityData &, const ValueArray &)
void MessageHandler(Message &msg)
name_t collmodel
Definition: entities.h:140
name_t model
Definition: entities.h:139
Definition: entities.h:52
Component< PhysicsComponent > physicscomponent
Definition: entities.h:61
Component< RenderComponent > rendercomponent
Definition: entities.h:60
Decoration(const SharedEntityData &, const ValueArray &)
name_t lightmap
Definition: entities.h:64
name_t model
Definition: entities.h:63
void MessageHandler(Message &msg)
Definition: entities.h:113
Component< RenderComponent > rendercomponent
Definition: entities.h:121
void MessageHandler(Message &msg)
name_t collmodel
Definition: entities.h:125
Pickup(const SharedEntityData &, const ValueArray &)
Component< PhysicsComponent > physicscomponent
Definition: entities.h:122
name_t model
Definition: entities.h:124
Definition: entities.h:98
Component< RenderComponent > rendercomponent
Definition: entities.h:106
name_t model
Definition: entities.h:109
Component< PhysicsComponent > physicscomponent
Definition: entities.h:107
void MessageHandler(Message &msg)
Train(const SharedEntityData &, const ValueArray &)
name_t collmodel
Definition: entities.h:110
Definition: entities.h:158
name_t collmodel
Definition: entities.h:170
name_t model
Definition: entities.h:169
TriggerAutosave(const SharedEntityData &, const ValueArray &)
Component< PhysicsComponent > physicscomponent
Definition: entities.h:167
Component< RenderComponent > rendercomponent
Definition: entities.h:166
Definition: entities.h:173
name_t model
Definition: entities.h:184
Component< PhysicsComponent > physicscomponent
Definition: entities.h:182
Component< RenderComponent > rendercomponent
Definition: entities.h:181
name_t collmodel
Definition: entities.h:185
TriggerHurt(const SharedEntityData &, const ValueArray &)
void MessageHandler(Message &msg)
Definition: entities.h:203
TriggerMultiple(const SharedEntityData &, const ValueArray &)
Component< PhysicsComponent > physicscomponent
Definition: entities.h:212
name_t collmodel
Definition: entities.h:215
Component< RenderComponent > rendercomponent
Definition: entities.h:211
name_t model
Definition: entities.h:214
Definition: entities.h:188
Component< PhysicsComponent > physicscomponent
Definition: entities.h:197
name_t collmodel
Definition: entities.h:200
Component< RenderComponent > rendercomponent
Definition: entities.h:196
TriggerOnce(const SharedEntityData &, const ValueArray &)
void MessageHandler(Message &msg)
name_t model
Definition: entities.h:199
Component< PhysicsComponent > physicscomponent
Definition: entities.h:272
TriggerPlayerMovement(const SharedEntityData &, const ValueArray &)
name_t model
Definition: entities.h:274
name_t collmodel
Definition: entities.h:275
Component< RenderComponent > rendercomponent
Definition: entities.h:271
Definition: entities.h:218
void MessageHandler(Message &msg)
TriggerPush(const SharedEntityData &, const ValueArray &)
Component< PhysicsComponent > physicscomponent
Definition: entities.h:227
name_t model
Definition: entities.h:229
name_t collmodel
Definition: entities.h:230
Component< RenderComponent > rendercomponent
Definition: entities.h:226
Definition: entities.h:233
name_t model
Definition: entities.h:244
Component< PhysicsComponent > physicscomponent
Definition: entities.h:242
name_t collmodel
Definition: entities.h:245
Component< RenderComponent > rendercomponent
Definition: entities.h:241
void MessageHandler(Message &msg)
TriggerRemove(const SharedEntityData &, const ValueArray &)
Definition: entities.h:248
name_t collmodel
Definition: entities.h:260
TriggerTeleport(const SharedEntityData &, const ValueArray &)
Component< PhysicsComponent > physicscomponent
Definition: entities.h:257
Component< RenderComponent > rendercomponent
Definition: entities.h:256
name_t model
Definition: entities.h:259
Definition: entities.h:83
void MessageHandler(Message &msg)
Water(const SharedEntityData &, const ValueArray &)
name_t model
Definition: entities.h:94
Component< RenderComponent > rendercomponent
Definition: entities.h:91
name_t collmodel
Definition: entities.h:95
Component< PhysicsComponent > physicscomponent
Definition: entities.h:92
Definition: value.h:336
Definition: character.h:10
Definition: api.h:9
glm::vec3 vec3
Definition: math.h:12
glm::quat quat
Definition: math.h:13
Definition: message.h:16
Definition: entity.cpp:26
Definition: uid.h:11