Drag[en]gine Script Module DragonScript
1.23
|
Stub for an element. More...
Public Member Functions | |
void | createAndAddElement (GameWorld gameWorld) |
Create element and add it to game world. 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... | |
Connection | getConnection () |
Connection to server or or null. More... | |
bool | getEnableNetworking () |
Enable networking for this stub. More... | |
UniqueID | getID () |
Unique identifier of object. More... | |
DMatrix | getMatrix () |
Stub matrix. 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... | |
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 | preloadResources () |
Preload resources. More... | |
void | removeAllTextures () |
Remove all textures. More... | |
void | removeTexture (StubElementTexture texture) |
Remove texture. 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 | 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... | |
void | writeToFile (FileWriter writer) |
Write stub to file. More... | |
Public Member Functions inherited from Dragengine.Preloading.StubWithProperties | |
Dictionary | getProperties () |
Copy of all properties as dictionary mapping String key to String value. More... | |
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 (Dictionary properties) |
Set all properties from dictionary mapping String key to String value. 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... | |
Public Attributes | |
UniqueID | pAttachTo |
ElementClass | pClass |
Connection | pConnection |
PreloadCounter | pCounter |
bool | pEnableNetworking |
UniqueID | pID |
DMatrix | pMatrix |
NetworkState | pNetworkState |
DVector | pPosition |
Vector | pRotation |
Vector | pScaling |
Array | pTextures |
Public Attributes inherited from Dragengine.Preloading.StubWithProperties | |
Dictionary | pProperties |
Properties. 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.createAndAddElement | ( | GameWorld | gameWorld | ) |
Create element and add it to game world.
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.
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.
DMatrix Dragengine.Preloading.StubElement.getMatrix | ( | ) |
Stub matrix.
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.
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.
void Dragengine.Preloading.StubElement.preloadResources | ( | ) |
Preload resources.
|
static |
Read stub from file.
If the element class is not found an instance of StubElementClassNotFound is returned.
Reimplemented in Dragengine.Preloading.StubElementClassNotFound.
void Dragengine.Preloading.StubElement.removeAllTextures | ( | ) |
Remove all textures.
void Dragengine.Preloading.StubElement.removeTexture | ( | StubElementTexture | texture | ) |
Remove texture.
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.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.
void Dragengine.Preloading.StubElement.writeToFile | ( | FileWriter | writer | ) |
Write stub to file.
Reimplemented in Dragengine.Preloading.StubElementClassNotFound.
UniqueID Dragengine.Preloading.StubElement.pAttachTo |
ElementClass Dragengine.Preloading.StubElement.pClass |
Connection Dragengine.Preloading.StubElement.pConnection |
PreloadCounter Dragengine.Preloading.StubElement.pCounter |
bool Dragengine.Preloading.StubElement.pEnableNetworking |
UniqueID Dragengine.Preloading.StubElement.pID |
DMatrix Dragengine.Preloading.StubElement.pMatrix |
NetworkState Dragengine.Preloading.StubElement.pNetworkState |
DVector Dragengine.Preloading.StubElement.pPosition |
Vector Dragengine.Preloading.StubElement.pRotation |
Vector Dragengine.Preloading.StubElement.pScaling |
Array Dragengine.Preloading.StubElement.pTextures |