|
Drag[en]gine Script Module DragonScript 1.35
|
List of sound resource elements class property for use with XML loading. More...
Public Member Functions | |
| void | add (Sound sound) |
| Add sound. | |
| void | addPath (String path) |
| Add a path. | |
| void | forEach (Block ablock) |
| For each sound with block with Sound as parameter. | |
| Sound | getAt (int index) |
| Sound at index. | |
| int | getCount () |
| Number of sounds. | |
| bool | getHasPreloaded () |
| Property has been preloaded. | |
| Sound | getRandom () |
| Get random sound or null if no sounds are present. | |
| ECPSoundList | new (String name) |
| Create property. | |
| void | removeAll () |
| Remove all sounds. | |
| void | removeAllPath () |
| Remove all path. | |
| void | setValue (Object value) |
| Set value of property from XML decoded value. | |
| Public Member Functions inherited from Dragengine.Scenery.ElementClassProperty | |
| void | dispose () |
| Dispose of element class property to break reference loops. | |
| String | getName () |
| Name. | |
| bool | logPreloadProblems (ElementClass elementClass, Console console) |
| Log preloading problems. | |
| void | preloadResources (ElementClass elementClass, PreloadCounter counter) |
| Preload resources if supported. | |
| Public Member Functions inherited from Dragengine.ResourceListener | |
| void | finishedLoading (String filename, ResourceLoaderType resourceType, Object resource) |
| Resource finished loading successfully. | |
| void | failedLoading (String filename, ResourceLoaderType resourceType) |
| Resource failed loading. | |
List of sound resource elements class property for use with XML loading.
Similar to ECPSound but allows to stored any number of sounds. Useful for having a list of similar sounds picking randomly one to play.
By default empty path does not add a sound. If you need the size of the sound list to be identical to the list of sound path specified use set add null for invalid sounds to true. In this case for all sound path that are empty or fail to load null is added to the list.
| void Dragengine.Scenery.ECPSoundList.add | ( | Sound | sound | ) |
| void Dragengine.Scenery.ECPSoundList.addPath | ( | String | path | ) |
| void Dragengine.Scenery.ECPSoundList.forEach | ( | Block | ablock | ) |
For each sound with block with Sound as parameter.
Referenced by setValue().
| Sound Dragengine.Scenery.ECPSoundList.getAt | ( | int | index | ) |
Sound at index.
Referenced by removeAll().
| int Dragengine.Scenery.ECPSoundList.getCount | ( | ) |
Number of sounds.
References add(), and addPath().
Referenced by getHasPreloaded(), and getRandom().
| bool Dragengine.Scenery.ECPSoundList.getHasPreloaded | ( | ) |
| Sound Dragengine.Scenery.ECPSoundList.getRandom | ( | ) |
| ECPSoundList Dragengine.Scenery.ECPSoundList.new | ( | String | name | ) |
Create property.
Reimplemented from Dragengine.Scenery.ElementClassProperty.
References new().
Referenced by new(), and setValue().
| void Dragengine.Scenery.ECPSoundList.removeAll | ( | ) |
| void Dragengine.Scenery.ECPSoundList.removeAllPath | ( | ) |
Remove all path.
Referenced by addPath().
| void Dragengine.Scenery.ECPSoundList.setValue | ( | Object | value | ) |
Set value of property from XML decoded value.
Reimplemented from Dragengine.Scenery.ElementClassProperty.
References add(), Dragengine.ResourceListener.failedLoading(), Dragengine.ResourceListener.finishedLoading(), forEach(), getHasPreloaded(), Dragengine.Scenery.ElementClassProperty.logPreloadProblems(), new(), Dragengine.Scenery.ElementClassProperty.preloadResources(), removeAll(), and setValue().
Referenced by setValue().