Tramway SDK
Public Member Functions | Static Public Member Functions | List of all members
tram::Ext::Design::SoundTable Class Reference

Maps actions to sounds. More...

#include <soundtable.h>

Public Member Functions

void AddSound (SoundAction type, name_t sound)
 
name_t GetSound (SoundAction type)
 
void PlaySound (SoundAction type)
 
void PlaySound (SoundAction type, vec3 position, float volume)
 

Static Public Member Functions

static SoundTableFind (name_t name)
 

Detailed Description

Maps actions to sounds.

Perfect for storing the aural properties of various materials, or taking the actions that a door or some other container can perform, e.g. opening, closing, trying to open but failing due to being locked, and mappping them to specific sounds.

Member Function Documentation

◆ AddSound()

void tram::Ext::Design::SoundTable::AddSound ( SoundAction  type,
name_t  sound 
)

◆ Find()

SoundTable * tram::Ext::Design::SoundTable::Find ( name_t  name)
static

◆ GetSound()

name_t tram::Ext::Design::SoundTable::GetSound ( SoundAction  type)

◆ PlaySound() [1/2]

void tram::Ext::Design::SoundTable::PlaySound ( SoundAction  type)

◆ PlaySound() [2/2]

void tram::Ext::Design::SoundTable::PlaySound ( SoundAction  type,
vec3  position,
float  volume 
)

The documentation for this class was generated from the following files: