Tramway SDK
sound.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_ENTITIES_AUDIO_H
5#define TRAM_SDK_ENTITIES_AUDIO_H
6
7#include <framework/entity.h>
10
11namespace tram {
12
13class AudioComponent;
14
15class Sound : public Entity {
16public:
18
19 // this should be a static method!!!
20 // and even better, the audiocomponent should have callbacks when the
21 // audio is finished playing, so that it can delete itself.. idk
22 Sound(name_t sound, float volume, vec3 position);
23 void UpdateParameters();
24 void SetParameters();
25 void Load();
26 void Unload();
27 void Serialize();
28 void MessageHandler(Message& msg);
30 static void Register();
31protected:
33
35 float volume;
37};
38
39}
40
41#endif // TRAM_SDK_ENTITIES_AUDIO_H
Definition: sound.h:13
Sound(name_t name)
Definition: sound.h:30
Wrapper for an EntityComponent pointer.
Definition: entitycomponent.h:53
Definition: entity.h:20
void Load()
Definition: resource.h:33
name_t sound
Definition: sound.h:34
float volume
Definition: sound.h:35
Sound(const SharedEntityData &, const ValueArray &)
int sound_flags
Definition: sound.h:36
void Serialize()
Definition: sound.cpp:105
void Unload()
void UpdateParameters()
Definition: sound.cpp:71
Component< AudioComponent > audio
Definition: sound.h:32
name_t GetType()
Definition: sound.cpp:39
void SetParameters()
Definition: sound.cpp:76
void MessageHandler(Message &msg)
Definition: sound.cpp:109
Definition: value.h:336
void Register(ValuePtr ptr, name_t name)
Definition: settings.cpp:9
Definition: api.h:9
glm::vec3 vec3
Definition: math.h:12
Definition: message.h:16
Definition: entity.cpp:26
Definition: uid.h:11