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

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

Inheritance diagram for Dragengine.Scenery.ECPAnimation:
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. More...
 
void failedLoading (String filename, ResourceLoaderType resourceType)
 Resource failed loading. More...
 
void finishedLoading (String path, ResourceLoaderType resourceType, Object resource)
 Resource has finished loading. More...
 
Animation getAnimation ()
 Animation resource or null if not present. More...
 
Animation getAnimation (StubWithProperties stub, ElementClass eclass)
 Animation modified by stub property if present. More...
 
bool getHasPreloaded ()
 Property has been preloaded. More...
 
String getPath ()
 Path to animation resource. More...
 
bool logPreloadProblems (ElementClass elementClass, Console console)
 Log preloading problems. More...
 
ECPAnimation new (String name)
 Create property. More...
 
ECPAnimation new (String name, String path)
 Create property with initial path. More...
 
void preloadResources (ElementClass elementClass, PreloadCounter counter)
 Preload resources if supported. More...
 
void setAnimation (Animation animation)
 Set animation resource or null if not present. More...
 
void setPath (String path)
 Set path to animation resource. 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...
 
Notification

Detailed Description

Animation resource element class property for use with XML loading.

Animation 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.ECPAnimation.copyValue ( ElementClass  elementClass,
ElementClassProperty  property 
)

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

Version
1.17

◆ failedLoading()

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

Resource failed loading.

Implements Dragengine.ResourceListener.

◆ finishedLoading()

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

Resource has finished loading.

Implements Dragengine.ResourceListener.

◆ getAnimation() [1/2]

Animation Dragengine.Scenery.ECPAnimation.getAnimation ( )

Animation resource or null if not present.

◆ getAnimation() [2/2]

Animation Dragengine.Scenery.ECPAnimation.getAnimation ( StubWithProperties  stub,
ElementClass  eclass 
)

Animation modified by stub property if present.

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

◆ getHasPreloaded()

bool Dragengine.Scenery.ECPAnimation.getHasPreloaded ( )

Property has been preloaded.

◆ getPath()

String Dragengine.Scenery.ECPAnimation.getPath ( )

Path to animation resource.

◆ logPreloadProblems()

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

Log preloading problems.

Returns
True if problems are present.

Reimplemented from Dragengine.Scenery.ElementClassProperty.

◆ new() [1/2]

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

Create property.

Reimplemented from Dragengine.Scenery.ElementClassProperty.

◆ new() [2/2]

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

Create property with initial path.

◆ preloadResources()

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

Preload resources if supported.

Reimplemented from Dragengine.Scenery.ElementClassProperty.

◆ setAnimation()

void Dragengine.Scenery.ECPAnimation.setAnimation ( Animation  animation)

Set animation resource or null if not present.

◆ setPath()

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

Set path to animation resource.

◆ setValue()

void Dragengine.Scenery.ECPAnimation.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: