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

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

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

Public Member Functions

void add (Skin skin)
 Add skin.
void addPath (String path)
 Add a path.
void forEach (Block ablock)
 For each skin with block with Skin as parameter.
void forEachPath (Block ablock)
 For each path with block with String as parameter.
Skin getAt (int index)
 Skin at index.
int getCount ()
 Number of skins.
bool getHasPreloaded ()
 Property has been preloaded.
String getPathAt (int index)
 path at index.
int getPathCount ()
 Count of path.
Skin getRandom ()
 Get random skin or null if no skins are present.
ECPSkinList new (String name)
 Create property.
void removeAll ()
 Remove all skins.
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.

Detailed Description

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

Similar to ECPSkin but allows to stored any number of skins. Useful for having a list of similar skins picking randomly one to play.

By default empty path does not add a skin. If you need the size of the skin list to be identical to the list of skin path specified use set add null for invalid skins to true. In this case for all skin path that are empty or fail to load null is added to the list.

Member Function Documentation

◆ add()

void Dragengine.Scenery.ECPSkinList.add ( Skin skin)

Add skin.

Referenced by getPathCount(), and setValue().

◆ addPath()

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

Add a path.

References addPath(), removeAll(), and removeAllPath().

Referenced by addPath().

◆ forEach()

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

For each skin with block with Skin as parameter.

Referenced by getRandom(), and setValue().

◆ forEachPath()

void Dragengine.Scenery.ECPSkinList.forEachPath ( Block ablock)

For each path with block with String as parameter.

Version
1.19

References getAt(), and getPathAt().

Referenced by getRandom().

◆ getAt()

Skin Dragengine.Scenery.ECPSkinList.getAt ( int index)

Skin at index.

Referenced by forEachPath(), getHasPreloaded(), and setValue().

◆ getCount()

int Dragengine.Scenery.ECPSkinList.getCount ( )

Number of skins.

Referenced by getPathAt(), removeAll(), and setValue().

◆ getHasPreloaded()

bool Dragengine.Scenery.ECPSkinList.getHasPreloaded ( )

Property has been preloaded.

References getAt().

Referenced by setValue().

◆ getPathAt()

String Dragengine.Scenery.ECPSkinList.getPathAt ( int index)

path at index.

Version
1.19

References getCount(), and getPathCount().

Referenced by forEachPath().

◆ getPathCount()

int Dragengine.Scenery.ECPSkinList.getPathCount ( )

Count of path.

Version
1.19

References add().

Referenced by getPathAt().

◆ getRandom()

Skin Dragengine.Scenery.ECPSkinList.getRandom ( )

Get random skin or null if no skins are present.

References forEach(), and forEachPath().

Referenced by setValue().

◆ new()

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

Create property.

Reimplemented from Dragengine.Scenery.ElementClassProperty.

References new().

Referenced by new(), and setValue().

◆ removeAll()

void Dragengine.Scenery.ECPSkinList.removeAll ( )

Remove all skins.

References getCount().

Referenced by addPath(), and setValue().

◆ removeAllPath()

void Dragengine.Scenery.ECPSkinList.removeAllPath ( )

Remove all path.

Referenced by addPath().

◆ setValue()


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