Handles playback of sound effects.
More...
#include <SoundEffectPlayer.h>
|
static constexpr int | index (const EffectIndex &e) |
| Converts EffectIndex to integer.
|
|
static constexpr EffectIndex | index (const int e) |
| Converts integer to EffectIndex.
|
|
static constexpr int | max_cnt () |
| Gets total number of sound effects.
|
|
Handles playback of sound effects.
◆ EffectIndex
Indexes for different sound effects.
Enumerator |
---|
JUMP | Jump sound effect.
|
SCORE | Score sound effect.
|
DIE | Death sound effect.
|
◆ SoundEffectPlayer()
SoundEffectPlayer::SoundEffectPlayer |
( |
QObject * |
parent | ) |
|
|
explicit |
◆ index() [1/2]
static constexpr int SoundEffectPlayer::index |
( |
const EffectIndex & |
e | ) |
|
|
inlinestaticconstexpr |
Converts EffectIndex to integer.
- Parameters
-
- Returns
- Integer representation
◆ index() [2/2]
static constexpr EffectIndex SoundEffectPlayer::index |
( |
const int |
e | ) |
|
|
inlinestaticconstexpr |
Converts integer to EffectIndex.
- Parameters
-
- Returns
- EffectIndex representation
◆ max_cnt()
static constexpr int SoundEffectPlayer::max_cnt |
( |
| ) |
|
|
inlinestaticconstexpr |
Gets total number of sound effects.
- Returns
- Count of available effects
◆ play()
Plays specified sound effect.
- Parameters
-
index | Index of effect to play |
The documentation for this class was generated from the following files:
- extern_app/games/CCIMX_DinoGame/core/SoundEffectPlayer.h
- extern_app/games/CCIMX_DinoGame/core/SoundEffectPlayer.cpp