Static
requiresA reference to another entity's component.
It'll internally search the current world for the given entity + component and keep and check the reference.
The idea is to keep the reference as a variable. This avoids ugly search code in the component space.
Optional
activesOnly: booleanOptional
entityName: stringGenerated using TypeDoc
SoundFxBag-Component
The property of sound should be like this:
If loaded successful one can do this:
const sounds = entity.findComponent("SoundFxBag"); sounds.playSimple('muh'); // simple sound const myHowlerSound = sounds.getSound('muh'); // full access
When sounds.playSimple('multi'); // is called both sounds are played at the given config
If a pending sound mix-entry exists during discard the mix-entry is still played using a setTimeout. This behavior can be undesired (e.g. causing effects being played in the next scene). For that the option discardSounds is for. Just put the discardSounds = {"multi": true} to make sure it does exceed lifetime of the object.
Set discardAll to true to make it a general options