Drag[en]gine Script Module DragonScript  1.23
Dragengine.Scenery.ECPSoundList Class Reference

List of sound resource elements class property for use with XML loading. More...

Inheritance diagram for Dragengine.Scenery.ECPSoundList:
Dragengine.Scenery.ElementClassProperty Dragengine.ResourceListener

Public Member Functions

void add (Sound sound)
 Add sound. More...
 
void addPath (String path)
 Add a path. More...
 
void forEach (Block ablock)
 For each sound with block with Sound as parameter. More...
 
Sound getAt (int index)
 Sound at index. More...
 
int getCount ()
 Number of sounds. More...
 
bool getHasPreloaded ()
 Property has been preloaded. More...
 
Sound getRandom ()
 Get random sound or null if no sounds are present. More...
 
ECPSoundList new (String name)
 Create property. More...
 
void removeAll ()
 Remove all sounds. More...
 
void removeAllPath ()
 Remove all path. More...
 
void setValue (Object value)
 Set value of property from XML decoded value. More...
 
- Public Member Functions inherited from Dragengine.Scenery.ElementClassProperty
void dispose ()
 Dispose of element class property to break reference loops. More...
 
String getName ()
 Name. More...
 
bool logPreloadProblems (ElementClass elementClass, Console console)
 Log preloading problems. More...
 
void preloadResources (ElementClass elementClass, PreloadCounter counter)
 Preload resources if supported. More...
 
- Public Member Functions inherited from Dragengine.ResourceListener
void finishedLoading (String filename, ResourceLoaderType resourceType, Object resource)
 Resource finished loading successfully. More...
 
void failedLoading (String filename, ResourceLoaderType resourceType)
 Resource failed loading. More...
 

Detailed Description

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.

Member Function Documentation

◆ add()

void Dragengine.Scenery.ECPSoundList.add ( Sound  sound)

Add sound.

◆ addPath()

void Dragengine.Scenery.ECPSoundList.addPath ( String  path)

Add a path.

◆ forEach()

void Dragengine.Scenery.ECPSoundList.forEach ( Block  ablock)

For each sound with block with Sound as parameter.

◆ getAt()

Sound Dragengine.Scenery.ECPSoundList.getAt ( int  index)

Sound at index.

◆ getCount()

int Dragengine.Scenery.ECPSoundList.getCount ( )

Number of sounds.

◆ getHasPreloaded()

bool Dragengine.Scenery.ECPSoundList.getHasPreloaded ( )

Property has been preloaded.

◆ getRandom()

Sound Dragengine.Scenery.ECPSoundList.getRandom ( )

Get random sound or null if no sounds are present.

◆ new()

ECPSoundList Dragengine.Scenery.ECPSoundList.new ( String  name)

Create property.

Reimplemented from Dragengine.Scenery.ElementClassProperty.

◆ removeAll()

void Dragengine.Scenery.ECPSoundList.removeAll ( )

Remove all sounds.

◆ removeAllPath()

void Dragengine.Scenery.ECPSoundList.removeAllPath ( )

Remove all path.

◆ setValue()

void Dragengine.Scenery.ECPSoundList.setValue ( Object  value)

Set value of property from XML decoded value.

Reimplemented from Dragengine.Scenery.ElementClassProperty.


The documentation for this class was generated from the following file: