Tramway SDK
soundtable.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_SOUNDTABLE_H
5#define TRAM_SDK_EXTENSIONS_DESIGN_SOUNDTABLE_H
6
7#include <vector>
8#include <framework/uid.h>
9#include <framework/math.h>
10
11namespace tram::Ext::Design {
12
19
23};
24
26public:
27 void AddSound(SoundAction type, name_t sound);
29 void PlaySound(SoundAction type);
30 void PlaySound(SoundAction type, vec3 position, float volume);
31
32 static SoundTable* Find(name_t name);
33private:
34 std::vector<std::pair<SoundAction, name_t>> sounds;
35};
36
37}
38
39#endif // TRAM_SDK_EXTENSIONS_DESIGN_SOUNDTABLE_H
Definition: soundtable.h:25
void AddSound(SoundAction type, name_t sound)
Definition: soundtable.cpp:18
name_t GetSound(SoundAction type)
Definition: soundtable.cpp:22
static SoundTable * Find(name_t name)
Definition: soundtable.cpp:46
void PlaySound(SoundAction type)
Definition: soundtable.cpp:34
Definition: character.h:10
SoundAction
Definition: soundtable.h:13
@ SOUND_END_OPEN
Definition: soundtable.h:17
@ SOUND_LOCKED
Definition: soundtable.h:16
@ SOUND_CLOSE
Definition: soundtable.h:15
@ SOUND_HIT
Definition: soundtable.h:22
@ SOUND_WALK_ON
Definition: soundtable.h:20
@ SOUND_OPEN
Definition: soundtable.h:14
@ SOUND_END_CLOSE
Definition: soundtable.h:18
@ SOUND_JUMP_ON
Definition: soundtable.h:21
glm::vec3 vec3
Definition: math.h:12
Definition: uid.h:11