SwitchContainer¶
class SwitchContainer : public SoundObject , public Asset<AmSwitchContainerID>
Amplitude Switch Container Asset.
A switch container is a container sound object where sounds and collections can be registered on one or multiple switches. Only one switch can be active at a time in a switch container. When a switch is active, all the sounds and collections that are registered on it will be played.
- See
- SoundObject
Functions¶
Name | Description |
---|---|
GetSwitch | Returns the switch attached to this SwitchContainer. |
GetFaderIn | Get the fade in Fader for the given sound object ID. |
GetFaderOut | Get the fade out Fader for the given sound object ID. |
GetSoundObjects | Returns the list of sound objects referenced in this SwitchContainer for the given state. |
Function Details¶
GetFaderIn¶
* GetFaderIn(AmObjectID id) const
Get the fade in Fader for the given sound object ID.
- Parameter
id
- The ID of the sound object.
- Return
- The fade in Fader.
GetFaderOut¶
* GetFaderOut(AmObjectID id) const
Get the fade out Fader for the given sound object ID.
- Parameter
id
- The ID of the sound object.
- Return
- The fade out Fader.
GetSoundObjects¶
[[nodiscard]] virtual const std::vector<SwitchContainerItem>& GetSoundObjects(AmObjectID stateId) const = 0
Returns the list of sound objects referenced in this SwitchContainer for the given state.
- Parameter
stateId
- The switch state to get the objects for.
- Return
- The list of sound object IDs registered to the given state.
GetSwitch¶
* GetSwitch() const
Returns the switch attached to this SwitchContainer.
- Return
- The switch of this SwitchContainer if available or nullptr.