|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.kernel.player.MusicState
A Bean property that keeps track of the current state of the running soundtrack on the client. The client, of course, also keeps track of its state, and all music state changes should be handled by this class to ensure consistency.
There's one of these per player, stored in a "@music-state" property. You can access it via player.getMusicState().
Nested Class Summary | |
static interface |
MusicState.States
Allows for convenient import of the music states. |
Field Summary |
Fields inherited from interface wyvern.common.net.RemoteAudioState |
PLAYING_INTRO_CONNECTED, PLAYING_INTRO_NOT_CONNECTED, PLAYING_OTHER_CONNECTED, PLAYING_OTHER_NOT_CONNECTED, READY_CONNECTED, READY_NOT_CONNECTED, START_STATE |
Constructor Summary | |
MusicState()
Constructs a new MusicState |
|
MusicState(Player player)
Constructs a new MusicState |
Method Summary | |
java.lang.String |
getPath()
Returns relative path to the music/sound file for current background music. |
Player |
getPlayer()
Returns the player we're attached to |
int |
getState()
Returns the current state of the client's soundtrack |
java.lang.String |
getStateName(int state)
Returns state name for the passed music state. |
boolean |
sameMusic(java.lang.String path)
Returns true if the passed path is the same as the one the player is currently playing. |
void |
setPath(java.lang.String path)
Sets relative path to the music/sound file |
void |
setPlayer(Player player)
Sets the player we're attached to |
void |
setState(int state)
Sets the current state of the client's soundtrack |
java.lang.String |
toString()
Prints debugging representation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MusicState()
public MusicState(Player player)
Method Detail |
public Player getPlayer()
public void setPlayer(Player player)
player
- the player we're attached topublic int getState()
public void setState(int state)
state
- the current state of the client's soundtrackpublic java.lang.String getStateName(int state)
public java.lang.String getPath()
public void setPath(java.lang.String path)
path
- relative path to the music/sound filepublic boolean sameMusic(java.lang.String path)
path
- any music file path
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |