Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
Dragengine.Scenery.ECPSound Class Reference

Sound resource element class property for use with XML loading. More...

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

Public Member Functions

void copyValue (ElementClass elementClass, ElementClassProperty property)
 Copy value from another element class property of the same type.
void failedLoading (String filename, ResourceLoaderType resourceType)
 Resource failed loading.
void finishedLoading (String path, ResourceLoaderType resourceType, Object resource)
 Resource has finished loading.
bool getHasPreloaded ()
 Property has been preloaded.
String getPath ()
 Path to sound resource.
Sound getSound ()
 Sound resource or null if not present.
Sound getSound (StubWithProperties stub, ElementClass eclass)
 Sound modified by stub property if present.
bool logPreloadProblems (ElementClass elementClass, Console console)
 Log preloading problems.
ECPSound new (String name)
 Create property.
ECPSound new (String name, String path)
 Create property with initial path.
void preloadResources (ElementClass elementClass, PreloadCounter counter)
 Preload resources if supported.
void setPath (String path)
 Set path to sound resource.
void setSound (Sound sound)
 Set sound resource or null if not present.
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.
Public Member Functions inherited from Dragengine.ResourceListener

Detailed Description

Sound resource element class property for use with XML loading.

Sound resource is set from XML using a path. Loads the resource during preloading. The value of the property is then the loaded resource. If loading fails null resource is stored.

Member Function Documentation

◆ copyValue()

void Dragengine.Scenery.ECPSound.copyValue ( ElementClass elementClass,
ElementClassProperty property )

Copy value from another element class property of the same type.

Version
1.17

References getHasPreloaded().

Referenced by logPreloadProblems().

◆ failedLoading()

void Dragengine.Scenery.ECPSound.failedLoading ( String filename,
ResourceLoaderType resourceType )

Resource failed loading.

Implements Dragengine.ResourceListener.

References preloadResources().

Referenced by getSound().

◆ finishedLoading()

void Dragengine.Scenery.ECPSound.finishedLoading ( String path,
ResourceLoaderType resourceType,
Object resource )

Resource has finished loading.

Implements Dragengine.ResourceListener.

References getPath().

Referenced by getSound().

◆ getHasPreloaded()

bool Dragengine.Scenery.ECPSound.getHasPreloaded ( )

Property has been preloaded.

References getSound().

Referenced by copyValue().

◆ getPath()

String Dragengine.Scenery.ECPSound.getPath ( )

Path to sound resource.

Referenced by finishedLoading(), and setPath().

◆ getSound() [1/2]

Sound Dragengine.Scenery.ECPSound.getSound ( )

Sound resource or null if not present.

References setPath().

Referenced by getHasPreloaded(), and getSound().

◆ getSound() [2/2]

Sound Dragengine.Scenery.ECPSound.getSound ( StubWithProperties stub,
ElementClass eclass )

Sound modified by stub property if present.

If named stub property is not present or empty string the stored sound is returned. If the named stub property is present it is loaded as sound resource.

References failedLoading(), finishedLoading(), getSound(), logPreloadProblems(), and new().

◆ logPreloadProblems()

bool Dragengine.Scenery.ECPSound.logPreloadProblems ( ElementClass elementClass,
Console console )

Log preloading problems.

Returns
True if problems are present.

Reimplemented from Dragengine.Scenery.ElementClassProperty.

References copyValue().

Referenced by getSound().

◆ new() [1/2]

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

Create property.

Reimplemented from Dragengine.Scenery.ElementClassProperty.

References new().

Referenced by getSound(), new(), and new().

◆ new() [2/2]

ECPSound Dragengine.Scenery.ECPSound.new ( String name,
String path )

Create property with initial path.

References new().

◆ preloadResources()

void Dragengine.Scenery.ECPSound.preloadResources ( ElementClass elementClass,
PreloadCounter counter )

Preload resources if supported.

Reimplemented from Dragengine.Scenery.ElementClassProperty.

References setValue().

Referenced by failedLoading().

◆ setPath()

void Dragengine.Scenery.ECPSound.setPath ( String path)

Set path to sound resource.

References getPath().

Referenced by getSound().

◆ setSound()

void Dragengine.Scenery.ECPSound.setSound ( Sound sound)

Set sound resource or null if not present.

Referenced by setValue().

◆ setValue()

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

Set value of property from XML decoded value.

Reimplemented from Dragengine.Scenery.ElementClassProperty.

References setSound().

Referenced by preloadResources().


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