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

Stub for element texture. More...

Inheritance diagram for Dragengine.Preloading.StubElementTexture:
Dragengine.Preloading.StubWithProperties Dragengine.ResourceListener

Public Member Functions

void failedLoading (String path, ResourceLoaderType resourceType)
 Resource has failed loading.
void finishedLoading (String path, ResourceLoaderType resourceType, Object resource)
 Resource has finished loading.
Color getColorTint ()
 Color tint or null to not replace the color tint.
String getPathSkin ()
 Skin path or null to not replace the skin.
Skin getSkin ()
 Skin.
String getTextureName ()
 Texture name.
TexMatrix2 getTransform ()
 Texture coordinates transformation or null to not replace the transformation.
void loadResources ()
 Load resources.
StubElementTexture new (String textureName)
 Create stub element texture.
StubElementTexture new (StubElementTexture stub)
 Create copy of stub element texture.
void preloadResources ()
 Add preload resources.
void setColorTint (Color color)
 Set color tint or null to not replace the color tint.
void setCounter (PreloadCounter counter)
 Set counter.
void setPathSkin (String pathSkin)
 Set skin path or null to not replace the skin.
void setTransform (TexMatrix2 transform)
 Set texture coordinates transformation or null to not replace the transformation.
bool verifyPreloading (StubElement element, Console console)
 Verify if a resource failed loading and print the problems to the console.
void writeToFile (FileWriter writer)
 Write stub to file.
Public Member Functions inherited from Dragengine.Preloading.StubWithProperties
Dictionary getProperties ()
 Copy of all properties as dictionary mapping String key to String value.
bool getPropertyBoolFor (String key, bool default)
 Boolean property value or default value if absent.
int getPropertyCount ()
 Number of properties.
float getPropertyFloatFor (String key, float default)
 Floating point property value or default value if absent.
int getPropertyIntFor (String key, int default)
 Integer property value or default value if absent.
Array getPropertyKeys ()
 Property keys (String array).
String getPropertyValueFor (String key, String default)
 Value of property or default value if absent.
bool hasPropertyWithKey (String key)
 Property key is present.
StubWithProperties new ()
 Create stub with properties.
StubWithProperties new (StubWithProperties stub)
 Create copy of stub with properties.
void readPropertiesFromFile (FileReader reader)
 Read properties from file.
void removeAllProperties ()
 Remove all properties.
void removePropertyWithKey (String key)
 Remove property if present.
void setFrom (Dictionary properties)
 Set all properties from dictionary mapping String key to String value.
void setFrom (StubWithProperties properties)
 Set properties from another StubWithProperties.
void setPropertyBoolFor (String key, bool value)
 Set property.
void setPropertyFloatFor (String key, float value)
 Set property.
void setPropertyIntFor (String key, int value)
 Set property.
void setPropertyValueFor (String key, String value)
 Set property.
void writePropertiesToFile (FileWriter writer)
 Write properties to file.
Public Member Functions inherited from Dragengine.ResourceListener

Static Public Member Functions

static StubElementTexture readFromFile (FileReader reader)
 Read stub from file.

Additional Inherited Members

Public Attributes inherited from Dragengine.Preloading.StubWithProperties
Dictionary pProperties
 Properties.

Detailed Description

Stub for element texture.

Used during asynchronous loading to hold the settings of a element texture until all resources have been loaded.

Member Function Documentation

◆ failedLoading()

void Dragengine.Preloading.StubElementTexture.failedLoading ( String path,
ResourceLoaderType resourceType )

Resource has failed loading.

Implements Dragengine.ResourceListener.

References getColorTint().

Referenced by writeToFile().

◆ finishedLoading()

void Dragengine.Preloading.StubElementTexture.finishedLoading ( String path,
ResourceLoaderType resourceType,
Object resource )

Resource has finished loading.

Implements Dragengine.ResourceListener.

Referenced by writeToFile().

◆ getColorTint()

Color Dragengine.Preloading.StubElementTexture.getColorTint ( )

Color tint or null to not replace the color tint.

References getSkin().

Referenced by failedLoading().

◆ getPathSkin()

String Dragengine.Preloading.StubElementTexture.getPathSkin ( )

Skin path or null to not replace the skin.

References setCounter().

Referenced by setColorTint().

◆ getSkin()

Skin Dragengine.Preloading.StubElementTexture.getSkin ( )

Skin.

Referenced by getColorTint().

◆ getTextureName()

String Dragengine.Preloading.StubElementTexture.getTextureName ( )

Texture name.

Referenced by getTransform().

◆ getTransform()

TexMatrix2 Dragengine.Preloading.StubElementTexture.getTransform ( )

Texture coordinates transformation or null to not replace the transformation.

References getTextureName().

Referenced by verifyPreloading().

◆ loadResources()

void Dragengine.Preloading.StubElementTexture.loadResources ( )

Load resources.

References setTransform().

Referenced by writeToFile().

◆ new() [1/2]

StubElementTexture Dragengine.Preloading.StubElementTexture.new ( String textureName)

Create stub element texture.

References new().

Referenced by new(), setCounter(), and writeToFile().

◆ new() [2/2]

StubElementTexture Dragengine.Preloading.StubElementTexture.new ( StubElementTexture stub)

Create copy of stub element texture.

◆ preloadResources()

void Dragengine.Preloading.StubElementTexture.preloadResources ( )

Add preload resources.

References setPathSkin().

Referenced by writeToFile().

◆ readFromFile()

StubElementTexture Dragengine.Preloading.StubElementTexture.readFromFile ( FileReader reader)
static

Read stub from file.

References setColorTint().

Referenced by writeToFile().

◆ setColorTint()

void Dragengine.Preloading.StubElementTexture.setColorTint ( Color color)

Set color tint or null to not replace the color tint.

References getPathSkin().

Referenced by readFromFile().

◆ setCounter()

void Dragengine.Preloading.StubElementTexture.setCounter ( PreloadCounter counter)

Set counter.

References new().

Referenced by getPathSkin().

◆ setPathSkin()

void Dragengine.Preloading.StubElementTexture.setPathSkin ( String pathSkin)

Set skin path or null to not replace the skin.

Referenced by preloadResources().

◆ setTransform()

void Dragengine.Preloading.StubElementTexture.setTransform ( TexMatrix2 transform)

Set texture coordinates transformation or null to not replace the transformation.

Referenced by loadResources().

◆ verifyPreloading()

bool Dragengine.Preloading.StubElementTexture.verifyPreloading ( StubElement element,
Console console )

Verify if a resource failed loading and print the problems to the console.

Returns
true if all resources loaded successfully.

References getTransform().

Referenced by writeToFile().

◆ writeToFile()


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