#include <soundemittercomponent.h>
Classes | |
class | SoundEmitterComponentPrivate |
Public Slots | |
Q_INVOKABLE void | play () |
Q_INVOKABLE void | setRadius (float radius) |
Q_INVOKABLE void | setVolume (float volume) |
Q_INVOKABLE void | setPitch (float pitch) |
Q_INVOKABLE void | setLoop (bool loop) |
Q_INVOKABLE void | setSound (Asset *asset) |
Q_INVOKABLE void | setAutoPlay (bool autoPlay) |
Public Member Functions | |
Q_INVOKABLE | SoundEmitterComponent (QObject *parent=0) |
SoundEmitterComponent (const GluonEngine::SoundEmitterComponent &other) | |
~SoundEmitterComponent () | |
virtual QString | category () const |
Asset * | sound () |
virtual void | initialize () |
virtual void | start () |
virtual void | draw (int timeLapse=0) |
virtual void | stop () |
virtual void | cleanup () |
Q_INVOKABLE float | radius () const |
Q_INVOKABLE float | volume () const |
Q_INVOKABLE float | pitch () const |
Q_INVOKABLE bool | isLooping () const |
Q_INVOKABLE bool | isPlaying () const |
Q_INVOKABLE bool | autoPlay () const |
Properties | |
GluonEngine::Asset | sound |
float | radius |
float | volume |
float | pitch |
bool | loop |
bool | autoPlay |
Definition at line 31 of file soundemittercomponent.h.
SoundEmitterComponent::SoundEmitterComponent | ( | QObject * | parent = 0 |
) |
Definition at line 61 of file soundemittercomponent.cpp.
SoundEmitterComponent::SoundEmitterComponent | ( | const GluonEngine::SoundEmitterComponent & | other | ) |
Definition at line 68 of file soundemittercomponent.cpp.
SoundEmitterComponent::~SoundEmitterComponent | ( | ) |
Definition at line 74 of file soundemittercomponent.cpp.
Q_INVOKABLE bool GluonEngine::SoundEmitterComponent::autoPlay | ( | ) | const |
QString SoundEmitterComponent::category | ( | ) | const [virtual] |
Return the category of the component. Meta-data used for filtering and sorting components
Reimplemented from GluonEngine::Component.
Definition at line 80 of file soundemittercomponent.cpp.
void SoundEmitterComponent::cleanup | ( | ) | [virtual] |
The cleanup function is called whenever an object is no longer needed. This happens mostly during scene changes.
Reimplemented from GluonEngine::Component.
Definition at line 154 of file soundemittercomponent.cpp.
void SoundEmitterComponent::draw | ( | int | timeLapse = 0 |
) | [virtual] |
The draw function is run every time the engine requests a redraw of the screen. Avoid putting any game logic in this function. The optional timeLapse depends on gameloop being used. By default Gluon uses a gameloop which runs update a fixed number of times per second, while draw is called as often as it can be. The timeLapse parameter then tells you how many milliseconds have passed since the last time update was run. This allows you to extrapolate draw positions of items and thus create a potentially smoother gaming experience.
timeLapse | The number of milliseconds passed since the last update
|
Reimplemented from GluonEngine::Component.
Definition at line 139 of file soundemittercomponent.cpp.
void SoundEmitterComponent::initialize | ( | ) | [virtual] |
The initialize function is called whenever an initialized object is needed. This includes scene changes.
Reimplemented from GluonEngine::Component.
Definition at line 107 of file soundemittercomponent.cpp.
bool SoundEmitterComponent::isLooping | ( | ) | const |
Definition at line 198 of file soundemittercomponent.cpp.
bool SoundEmitterComponent::isPlaying | ( | ) | const |
Definition at line 203 of file soundemittercomponent.cpp.
Q_INVOKABLE float GluonEngine::SoundEmitterComponent::pitch | ( | ) | const |
void SoundEmitterComponent::play | ( | ) | [slot] |
Definition at line 85 of file soundemittercomponent.cpp.
Q_INVOKABLE float GluonEngine::SoundEmitterComponent::radius | ( | ) | const |
void SoundEmitterComponent::setAutoPlay | ( | bool | autoPlay | ) | [slot] |
Definition at line 235 of file soundemittercomponent.cpp.
void SoundEmitterComponent::setLoop | ( | bool | loop | ) | [slot] |
Definition at line 212 of file soundemittercomponent.cpp.
void SoundEmitterComponent::setPitch | ( | float | pitch | ) | [slot] |
Definition at line 191 of file soundemittercomponent.cpp.
void SoundEmitterComponent::setRadius | ( | float | radius | ) | [slot] |
Definition at line 167 of file soundemittercomponent.cpp.
void SoundEmitterComponent::setSound | ( | Asset * | asset | ) | [slot] |
Definition at line 95 of file soundemittercomponent.cpp.
void SoundEmitterComponent::setVolume | ( | float | volume | ) | [slot] |
Definition at line 179 of file soundemittercomponent.cpp.
Asset* GluonEngine::SoundEmitterComponent::sound | ( | ) |
void SoundEmitterComponent::start | ( | ) | [virtual] |
The start function is run once after each scene change, immediately before the first update
Reimplemented from GluonEngine::Component.
Definition at line 116 of file soundemittercomponent.cpp.
void SoundEmitterComponent::stop | ( | ) | [virtual] |
The stop function is run once when the gameloop is stopped. Use it for removing temporary data between runs. Reimplement this function if you have something that needs cleaning up between runs.
Reimplemented from GluonEngine::Component.
Definition at line 146 of file soundemittercomponent.cpp.
Q_INVOKABLE float GluonEngine::SoundEmitterComponent::volume | ( | ) | const |
bool SoundEmitterComponent::autoPlay [read, write] |
Definition at line 39 of file soundemittercomponent.h.
bool GluonEngine::SoundEmitterComponent::loop [read, write] |
Definition at line 38 of file soundemittercomponent.h.
float SoundEmitterComponent::pitch [read, write] |
Definition at line 37 of file soundemittercomponent.h.
float SoundEmitterComponent::radius [read, write] |
Definition at line 35 of file soundemittercomponent.h.
Asset * SoundEmitterComponent::sound [read, write] |
Definition at line 34 of file soundemittercomponent.h.
float SoundEmitterComponent::volume [read, write] |
Definition at line 36 of file soundemittercomponent.h.