Collection¶
class Collection : public SoundObject , public Asset<AmCollectionID>
Amplitude Collection Asset.
A Collection
is a container sound object that group multiple sounds over the same name. Only one sound can be playing at a time in the same collection, and the sound picked for playback is chosen by the collection's Scheduler
.
- See
- SoundObject
Functions¶
Name | Description |
---|---|
SelectFromWorld | Returns a Sound from this collection from the World scope. |
SelectFromEntity | Returns a Sound from this collection from an Entity scope. |
ResetEntityScopeScheduler | Resets the internal state of the scheduler running for the given Entity. |
ResetWorldScopeScheduler | Resets the internal state of the scheduler running for the World. |
GetSounds | Returns the list of Sound objects referenced in this collection. |
Function Details¶
GetSounds¶
[[nodiscard]] virtual const std::vector<AmSoundID>& GetSounds() const = 0
Returns the list of Sound objects referenced in this collection.
- Return
- The list of Sound IDs.
ResetEntityScopeScheduler¶
virtual void ResetEntityScopeScheduler(const Entity& entity) = 0
Resets the internal state of the scheduler running for the given Entity.
- Parameter
entity
- The entity for which reset the scheduler state.
ResetWorldScopeScheduler¶
virtual void ResetWorldScopeScheduler() = 0
Resets the internal state of the scheduler running for the World.
SelectFromEntity¶
* SelectFromEntity(const Entity& entity, const std::vector<AmSoundID>& toSkip)
Returns a Sound from this collection from an Entity scope.
- Parameter
entity
- The entity from which pick the sound.
- Parameter
toSkip
- The list of Sound IDs to skip fom the selection.
- Return
- The selected Sound.
SelectFromWorld¶
* SelectFromWorld(const std::vector<AmSoundID>& toSkip) const
Returns a Sound from this collection from the World scope.
- Parameter
toSkip
- The list of Sound IDs to skip fom the selection.
- Return
- The selected Sound.