Package MeatEngine :: Package MoodMusic :: Module player :: Class Player
[hide private]
[frames] | no frames]

Class Player

source code

Instance Methods [hide private]
__init__(self, musicLibrary) source code
addState(self, name) source code
addTransition(self, fromState, toState) source code
addMusicToState(self, stateName, trackName) source code
addMusicDirectoryToState(self, stateName, directoryName) source code
addMusicToTransition(self, fromName, toName, trackName) source code
addMusicDirectoryToTransition(self, fromName, toName, directoryName) source code
getState(self) source code
setState(self, stateName)
You might instead want to use pushState, which handles transitions
source code
pushState(self, stateName)
this adds a state to the end of the current mood stack - transitions will be played to get the player to the destination
source code
if the music is still playing, do nothing.
source code
Method Details [hide private]


source code 

if the music is still playing, do nothing. if we're at the end of a song, if there's only one state on the stack, pick a new song.

if there's more than one state, look at the top two - if there is a transition, play that transition. otherwise, if there's a wildcard transition, play that otherwise, simply jump to the new state, and play a song randomly there.

pop the top state off