|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectwyvern.kernel.properties.PList
wyvern.kernel.maps.MapObject
wyvern.lib.properties.Soundtrack
Default implementation for the wyvern.lib.Music interface. Configurable via various properties, it can also be placed in a standalone archetype file and referenced in the "music" property of a map.
| Field Summary | |
static double |
DEFAULT_GAIN
|
| Fields inherited from class wyvern.kernel.maps.MapObject |
IN_MAP_EDITOR, listenerList_ |
| Fields inherited from class wyvern.kernel.properties.PList |
readOnly_ |
| Fields inherited from interface wyvern.lib.Music |
DEFAULT_COMBAT_MUSIC, DEFAULT_FUNERAL_MUSIC, DEFAULT_LEVELUP_MUSIC, DEFAULT_LOW_HP_COMBAT_MUSIC, DEFAULT_REPEAT_DELAY, DEFAULT_REPEATS, LOOP_FOREVER, PRIORITY_HIGH, PRIORITY_NORMAL |
| Fields inherited from interface wyvern.lib.PropertyList |
PROPERTY_PACKAGE |
| Constructor Summary | |
Soundtrack()
No-arg constructor required for bean properties. |
|
Soundtrack(java.lang.String path)
Constructs a new Soundtrack |
|
| Method Summary | |
double |
getGain()
Returns the sound volume, from 0.0 to 1.0. |
java.lang.String |
getPath()
Returns the relative path, including extension, for the music for this soundtrack. |
int |
getRepeatDelay()
Returns number of millis to wait between repeats. |
int |
getRepeats()
Returns number of repeats. 0 means only play once. |
void |
initialize()
Initialize() method, called (for GameObject bean properties) after instantiating the property, and cloning it if it's a MutableProperty, but before it's added to the destination PropertyList. |
void |
setGain(double gain)
Sets the sound gain (volume) from 0.0 to 1.0. |
void |
setPath(java.lang.String path)
Sets the path. |
void |
setRepeatDelay(int delay)
Sets delay in millis between repeats. |
void |
setRepeats(int repeats)
Sets the number of repeats to play before stopping. |
java.lang.String |
toString()
Returns debugging string. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final double DEFAULT_GAIN
| Constructor Detail |
public Soundtrack()
public Soundtrack(java.lang.String path)
| Method Detail |
public void initialize()
If the user didn't specify a gain, use the default.
initialize in interface GameObjectinitialize in class MapObjectpublic java.lang.String getPath()
getPath in interface Alertpublic void setPath(java.lang.String path)
setPath in interface Alertpath - relative path to the sound file,
e.g. "wiz/foobar/sounds/mysound.ogg"public int getRepeats()
getRepeats in interface Musicpublic void setRepeats(int repeats)
setRepeats in interface Musicrepeats - public double getGain()
getGain in interface Alertpublic void setGain(double gain)
setGain in interface Alertgain - the new gain, 0.0 is off, 1.0 is max volumepublic int getRepeatDelay()
getRepeatDelay in interface Musicpublic void setRepeatDelay(int delay)
setRepeatDelay in interface Musicdelay - delay in millis between repeats
public java.lang.String toString()
toString in class MapObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||