|
Thrive
|
Represents a single sound. More...
#include <sound_source_system.h>
Classes | |
| struct | Properties |
| Sound properties. More... | |
Public Types | |
| enum | PlayState { Play, Pause, Stop } |
| Play mode of the sound. | |
Public Member Functions | |
| Sound () | |
| Default constructor for loading. | |
| Sound (std::string name, std::string filename) | |
| Constructor. More... | |
| std::string | filename () const |
| The file that the sound is playing. More... | |
| void | load (const StorageContainer &storage) |
| Loads a sound from storage. More... | |
| std::string | name () const |
| The name of the sound. More... | |
| void | pause () |
| Pauses the sound during the next frame. | |
| void | play () |
| Starts (or resumes) playing the sound. | |
| void | stop () |
| Stops the sound during the next frame. | |
| StorageContainer | storage () const |
| Constructs a storage container for serialization. More... | |
Static Public Member Functions | |
| static luabind::scope | luaBindings () |
| Lua bindings. More... | |
Public Attributes | |
| Properties | m_properties |
| Properties. | |
| SoundEmitter * | m_sound = nullptr |
| Pointer to internal sound. | |
Represents a single sound.
| Sound::Sound | ( | std::string | name, |
| std::string | filename | ||
| ) |
Constructor.
| name | The name of the sound (must be unique) |
| filename | The name of the sound file |
| std::string Sound::filename | ( | ) | const |
The file that the sound is playing.
| void Sound::load | ( | const StorageContainer & | storage | ) |
Loads a sound from storage.
| storage |
|
static |
Lua bindings.
Exposes:
| std::string Sound::name | ( | ) | const |
The name of the sound.
| StorageContainer Sound::storage | ( | ) | const |
Constructs a storage container for serialization.
1.8.10