Homepage | Demos | Overview | Downloads | Tutorials | Reference | Credits |
#include <SoundTestBehavior.h>
Inheritance diagram for SoundTestBehavior:
A different sound will be played for each of the buttons, except the head buttons. When the chin button is held down, any sounds (from this behavior) will be queued up and then played successively once the chin button is released.
Notice that this doesn't preload all needed sounds:
barkmed.wav
is listed in /ms/config/tekkotsu.cfg as a preloaded system soundgrowl.wav
will be loaded before being played automatically - notice the hiccup this can cause.
Definition at line 21 of file SoundTestBehavior.h.
Public Member Functions | |
SoundTestBehavior () | |
Constructor. | |
virtual void | DoStart () |
Load some sounds, listen for button events. | |
virtual void | DoStop () |
Release sounds we loaded in DoStart(). | |
virtual void | processEvent (const EventBase &event) |
Play the sound corresponding to the button. | |
virtual std::string | getName () const |
returns name to system | |
Static Public Member Functions | |
std::string | getClassDescription () |
Gives a short description of what this class of behaviors does... you should override this (but don't have to). | |
Protected Member Functions | |
void | play (const char *name) |
called when a button is pressed - checks if it should enqueue or just play | |
Protected Attributes | |
SoundManager::Play_ID | curplay |
current chain (may not be valid if chin button not down or time is past endtime) | |
unsigned int | endtime |
the expected end of play time for the current chain | |
Event Templates | |
Used to match against the different buttons that have sounds mapped to them | |
EventBase | LFr |
EventBase | RFr |
EventBase | LBk |
EventBase | RBk |
EventBase | Back |
Static Protected Attributes | |
const bool | pauseWhileChin = true |
if this is true, won't start playing chain until you release the chin button |
|
Constructor.
Definition at line 24 of file SoundTestBehavior.h. |
|
Load some sounds, listen for button events.
Reimplemented from BehaviorBase. Definition at line 43 of file SoundTestBehavior.h. |
|
Release sounds we loaded in DoStart().
Reimplemented from BehaviorBase. Definition at line 52 of file SoundTestBehavior.h. |
|
Gives a short description of what this class of behaviors does... you should override this (but don't have to).
Reimplemented from BehaviorBase. Definition at line 83 of file SoundTestBehavior.h. |
|
returns name to system
Implements BehaviorBase. Definition at line 82 of file SoundTestBehavior.h. |
|
called when a button is pressed - checks if it should enqueue or just play
Definition at line 86 of file SoundTestBehavior.h. Referenced by processEvent(). |
|
Play the sound corresponding to the button.
Reimplemented from BehaviorBase. Definition at line 61 of file SoundTestBehavior.h. |
|
Definition at line 114 of file SoundTestBehavior.h. Referenced by processEvent(), and SoundTestBehavior(). |
|
current chain (may not be valid if chin button not down or time is past endtime)
Definition at line 109 of file SoundTestBehavior.h. Referenced by play(), processEvent(), and SoundTestBehavior(). |
|
the expected end of play time for the current chain
Definition at line 110 of file SoundTestBehavior.h. Referenced by play(), processEvent(), and SoundTestBehavior(). |
|
Definition at line 114 of file SoundTestBehavior.h. Referenced by processEvent(), and SoundTestBehavior(). |
|
Definition at line 114 of file SoundTestBehavior.h. Referenced by processEvent(), and SoundTestBehavior(). |
|
if this is true, won't start playing chain until you release the chin button
Definition at line 108 of file SoundTestBehavior.h. Referenced by play(), and processEvent(). |
|
Definition at line 114 of file SoundTestBehavior.h. Referenced by processEvent(), and SoundTestBehavior(). |
|
Definition at line 114 of file SoundTestBehavior.h. Referenced by processEvent(), and SoundTestBehavior(). |
Tekkotsu v2.0 |
Generated Wed Jan 21 03:23:28 2004 by Doxygen 1.3.4 |