Drag[en]gine Script Module DragonScript Script API  1.0
Skin Class Reference

Immutable skin resources. More...

Inheritance diagram for Skin:

Public Member Functions

Management
String getFilename ()
 Normalized filename the skin has been loaded from. More...
 
int getTextureCount ()
 Number of textures. More...
 
int indexOfTextureNamed (String name)
 Index of named texture or -1 if absent. More...
 
String getTextureName (int texture)
 Name of texture at index. More...
 
bool equals (Object other)
 Skin is equal to another object. More...
 
int hashCode ()
 Hash code for use as dictionary keys. More...
 

Constructors

Skin new (String filename)
 Load skin from file. More...
 
static void loadAsynchron (String filename, ResourceNotifier notifier)
 Load skin from file asynchronously. More...
 

Detailed Description

Immutable skin resources.

Skin resources provide the material properties for meshes to render components with.

This is a native class. It can not be subclassed.

Author
Roland Pl├╝ss
Version
1.0
Date
2015

Member Function Documentation

§ equals()

bool equals ( Object  other)

Skin is equal to another object.

Implements Object.equals(Object).

Returns
true if other is of type Skin and both point to the same engine skin resource.

§ getFilename()

String getFilename ( )

Normalized filename the skin has been loaded from.

§ getTextureCount()

int getTextureCount ( )

Number of textures.

§ getTextureName()

String getTextureName ( int  texture)

Name of texture at index.

Exceptions
EOutOfBoundarytexture is less than 0 or greater than or equal to getTextureCount().

§ hashCode()

int hashCode ( )

Hash code for use as dictionary keys.

Implements Object.hashCode().

§ indexOfTextureNamed()

int indexOfTextureNamed ( String  name)

Index of named texture or -1 if absent.

§ loadAsynchron()

static void loadAsynchron ( String  filename,
ResourceNotifier  notifier 
)
static

Load skin from file asynchronously.

Registers a request in the game engine to load an skin. Once finished or if the file is already loaded the notifier is used to deliver the loaded skin or null if the loading failed.

§ new()

Skin new ( String  filename)

Load skin from file.

If the skin file has been already loaded it is assigned to this object. If the skin is not loaded yet the engine loads the skin. This call blocks until the skin is fully loaded and ready to be used. For asynchronous loading use loadAsynchron(). Multiple objects can point to the same loaded skin resource. Once no object instance uses an skin file anymore it is released from memory.


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