#include <SFXComponent.hpp>
|
| void | init () override |
| void | destroy () override |
| | Automatically stops all SFX audio from playing.
|
| void | update (ae::q20_12_t) override |
| ae::ComponentTypeID | getType () const override |
| void | registerSFX (SFX sfx) |
| | Register the SFX to use.
|
| void | playSFX (SFX sfx, int volume=127, int panning=64) |
| | Play the specified SFX, if registered.
|
| void | stopSFX () |
| | Stops all SFX audio from playing.
|
Definition at line 14 of file SFXComponent.hpp.
◆ destroy()
| void SFXComponent::destroy |
( |
| ) |
|
|
override |
◆ getType()
| ae::ComponentTypeID SFXComponent::getType |
( |
| ) |
const |
|
inlineoverride |
◆ init()
| void SFXComponent::init |
( |
| ) |
|
|
inlineoverride |
◆ playSFX()
| void SFXComponent::playSFX |
( |
SFX | sfx, |
|
|
int | volume = 127, |
|
|
int | panning = 64 ) |
Play the specified SFX, if registered.
- Parameters
-
| sfx | the SFX to play |
| volume | the volume of the SFX. Range is from 0-127 |
| panning | the direction to play the sound effect (left to right). The range is 0-127 (64 plays both left and right equally) |
Definition at line 13 of file SFXComponent.cpp.
◆ registerSFX()
| void SFXComponent::registerSFX |
( |
SFX | sfx | ) |
|
Register the SFX to use.
- Note
- Multiple SFXs can be registered at once
- Parameters
-
Definition at line 8 of file SFXComponent.cpp.
◆ stopSFX()
| void SFXComponent::stopSFX |
( |
| ) |
|
◆ submitToManager()
| void SFXComponent::submitToManager |
( |
| ) |
|
|
inlineoverrideprotected |
◆ update()
| void SFXComponent::update |
( |
ae::q20_12_t | | ) |
|
|
inlineoverride |
◆ am
| AudioManager& SFXComponent::am = AudioManager::getInstance() |
|
private |
◆ TYPE_ID
| ae::ComponentTypeID SFXComponent::TYPE_ID = static_cast<ae::ComponentTypeID>(ComponentType::SFX) |
|
staticconstexpr |
The documentation for this class was generated from the following files: