Drag[en]gine Script Module DragonScript
1.21
|
Stub for an element. More...
Public Member Functions | |
void | addTexture (StubElementTexture texture) |
Add texture. More... | |
void | createAndAddElement (GameWorld gameWorld) |
Create element and add it to game world. More... | |
Element | createElement () |
Create element. More... | |
void | forEachTexture (Block ablock) |
Visit textures with a block. More... | |
UniqueID | getAttachTo () |
Identifier of object to attach to once added to a game world. More... | |
ElementClass | getClass () |
Element class. More... | |
Connection | getConnection () |
Connection to server or or null. More... | |
bool | getEnableNetworking () |
Enable networking for this stub. More... | |
UniqueID | getID () |
Unique identifier of object. More... | |
NetworkState | getNetworkState () |
Network state provided by server or null. More... | |
DVector | getPosition () |
Position. More... | |
Vector | getRotation () |
Rotation. More... | |
Vector | getScaling () |
Scaling if sizable. More... | |
StubElementTexture | getTextureAt (int index) |
Texture at index. More... | |
int | getTextureCount () |
Number of textures. More... | |
StubElementTexture | getTextureNamed (String name) |
Named texture or null if not found. More... | |
void | loadAndAddElement (PersistencyEnvironment env, FileReader reader, GameWorld gameWorld) |
Load element using file reader and add it to game world. More... | |
Element | loadElement (PersistencyEnvironment env, FileReader reader) |
Load element using file reader. More... | |
void | loadResources () |
Load resources. More... | |
StubElement | new (ElementClass eclass) |
Create element stub. More... | |
StubElement | new (ElementClass eclass, UniqueID id) |
Create element stub. More... | |
StubElement | new (ElementClass eclass, UniqueID id, StubWithProperties properties) |
Create element stub. More... | |
StubElement | new (StubElement stub) |
Create copy of element stub. More... | |
void | setAttachTo (UniqueID id) |
Set dentifier of object to attach to once added to a game world. More... | |
void | setClass (ElementClass elementClass) |
Set element class. More... | |
void | setConnection (Connection connection) |
Set connection to server or null. More... | |
void | setCounter (PreloadCounter counter) |
Set counter. More... | |
void | setEnableNetworking (bool enable) |
Set if networking is enabled for this stub. More... | |
void | setID (UniqueID id) |
Set unique identifier of object. More... | |
void | setNetworkState (NetworkState networkState) |
Set network state provided by server or null. More... | |
void | setPosition (DVector position) |
Set position. More... | |
void | setRotation (Vector rotation) |
Set rotation. More... | |
void | setScaling (Vector scaling) |
Set scaling if sizable. More... | |
bool | verifyPreloading (Console console) |
Verify if a resource failed preloading and print the problems to the console. More... | |
void | writeToFile (FileWriter writer) |
Write stub to file. More... | |
Public Member Functions inherited from Dragengine.Preloading.StubWithProperties | |
bool | getPropertyBoolFor (String key, bool default) |
Boolean property value or default value if absent. More... | |
int | getPropertyCount () |
Number of properties. More... | |
float | getPropertyFloatFor (String key, float default) |
Floating point property value or default value if absent. More... | |
int | getPropertyIntFor (String key, int default) |
Integer property value or default value if absent. More... | |
Array | getPropertyKeys () |
Property keys (String array). More... | |
String | getPropertyValueFor (String key, String default) |
Value of property or default value if absent. More... | |
bool | hasPropertyWithKey (String key) |
Property key is present. More... | |
StubWithProperties | new () |
Create stub with properties. More... | |
StubWithProperties | new (StubWithProperties stub) |
Create copy of stub with properties. More... | |
void | readPropertiesFromFile (FileReader reader) |
Read properties from file. More... | |
void | removeAllProperties () |
Remove all properties. More... | |
void | removePropertyWithKey (String key) |
Remove property if present. More... | |
void | setFrom (StubWithProperties properties) |
Set properties from another StubWithProperties. More... | |
void | setPropertyBoolFor (String key, bool value) |
Set property. More... | |
void | setPropertyFloatFor (String key, float value) |
Set property. More... | |
void | setPropertyIntFor (String key, int value) |
Set property. More... | |
void | setPropertyValueFor (String key, String value) |
Set property. More... | |
void | writePropertiesToFile (FileWriter writer) |
Write properties to file. More... | |
Static Public Member Functions | |
static StubElement | readFromFile (FileReader reader, ElementClassList elementClassList) |
Read stub from file. More... | |
Stub for an element.
Used during asynchronous loading to hold the settings of an element until all resources have been loaded. The network connection parameters are present only during creation time and are not persisted.
void Dragengine.Preloading.StubElement.addTexture | ( | StubElementTexture | texture | ) |
Add texture.
void Dragengine.Preloading.StubElement.createAndAddElement | ( | GameWorld | gameWorld | ) |
Create element and add it to game world.
Reimplemented in Dragengine.Preloading.StubElementClassNotFound.
Element Dragengine.Preloading.StubElement.createElement | ( | ) |
Create element.
Reimplemented in Dragengine.Preloading.StubElementClassNotFound.
void Dragengine.Preloading.StubElement.forEachTexture | ( | Block | ablock | ) |
Visit textures with a block.
UniqueID Dragengine.Preloading.StubElement.getAttachTo | ( | ) |
Identifier of object to attach to once added to a game world.
ElementClass Dragengine.Preloading.StubElement.getClass | ( | ) |
Element class.
Connection Dragengine.Preloading.StubElement.getConnection | ( | ) |
Connection to server or or null.
bool Dragengine.Preloading.StubElement.getEnableNetworking | ( | ) |
Enable networking for this stub.
UniqueID Dragengine.Preloading.StubElement.getID | ( | ) |
Unique identifier of object.
NetworkState Dragengine.Preloading.StubElement.getNetworkState | ( | ) |
Network state provided by server or null.
DVector Dragengine.Preloading.StubElement.getPosition | ( | ) |
Position.
Vector Dragengine.Preloading.StubElement.getRotation | ( | ) |
Rotation.
Vector Dragengine.Preloading.StubElement.getScaling | ( | ) |
Scaling if sizable.
StubElementTexture Dragengine.Preloading.StubElement.getTextureAt | ( | int | index | ) |
Texture at index.
int Dragengine.Preloading.StubElement.getTextureCount | ( | ) |
Number of textures.
StubElementTexture Dragengine.Preloading.StubElement.getTextureNamed | ( | String | name | ) |
Named texture or null if not found.
void Dragengine.Preloading.StubElement.loadAndAddElement | ( | PersistencyEnvironment | env, |
FileReader | reader, | ||
GameWorld | gameWorld | ||
) |
Load element using file reader and add it to game world.
Reimplemented in Dragengine.Preloading.StubElementClassNotFound.
Element Dragengine.Preloading.StubElement.loadElement | ( | PersistencyEnvironment | env, |
FileReader | reader | ||
) |
Load element using file reader.
Reimplemented in Dragengine.Preloading.StubElementClassNotFound.
void Dragengine.Preloading.StubElement.loadResources | ( | ) |
Load resources.
StubElement Dragengine.Preloading.StubElement.new | ( | ElementClass | eclass | ) |
Create element stub.
StubElement Dragengine.Preloading.StubElement.new | ( | ElementClass | eclass, |
UniqueID | id | ||
) |
Create element stub.
StubElement Dragengine.Preloading.StubElement.new | ( | ElementClass | eclass, |
UniqueID | id, | ||
StubWithProperties | properties | ||
) |
Create element stub.
StubElement Dragengine.Preloading.StubElement.new | ( | StubElement | stub | ) |
Create copy of element stub.
Reimplemented in Dragengine.Preloading.StubElementClassNotFound.
|
static |
Read stub from file.
Reimplemented in Dragengine.Preloading.StubElementClassNotFound.
void Dragengine.Preloading.StubElement.setAttachTo | ( | UniqueID | id | ) |
Set dentifier of object to attach to once added to a game world.
void Dragengine.Preloading.StubElement.setClass | ( | ElementClass | elementClass | ) |
Set element class.
void Dragengine.Preloading.StubElement.setConnection | ( | Connection | connection | ) |
Set connection to server or null.
void Dragengine.Preloading.StubElement.setCounter | ( | PreloadCounter | counter | ) |
Set counter.
void Dragengine.Preloading.StubElement.setEnableNetworking | ( | bool | enable | ) |
Set if networking is enabled for this stub.
void Dragengine.Preloading.StubElement.setID | ( | UniqueID | id | ) |
Set unique identifier of object.
void Dragengine.Preloading.StubElement.setNetworkState | ( | NetworkState | networkState | ) |
Set network state provided by server or null.
void Dragengine.Preloading.StubElement.setPosition | ( | DVector | position | ) |
Set position.
void Dragengine.Preloading.StubElement.setRotation | ( | Vector | rotation | ) |
Set rotation.
void Dragengine.Preloading.StubElement.setScaling | ( | Vector | scaling | ) |
Set scaling if sizable.
bool Dragengine.Preloading.StubElement.verifyPreloading | ( | Console | console | ) |
Verify if a resource failed preloading and print the problems to the console.
Reimplemented in Dragengine.Preloading.StubElementClassNotFound.
void Dragengine.Preloading.StubElement.writeToFile | ( | FileWriter | writer | ) |
Write stub to file.
Reimplemented in Dragengine.Preloading.StubElementClassNotFound.