|
Drag[en]gine Script Module DragonScript 1.35
|
Stub for an element. More...
Public Member Functions | |
| void | addAttachableBehavior (String factoryId) |
| Add attachable behavior. | |
| void | createAndAddElement (GameWorld gameWorld) |
| Create element and add it to game world. | |
| void | forEachAttachableBehavior (Block ablock) |
| Visit attachable behaviors using block. | |
| void | forEachTexture (Block ablock) |
| Visit textures with a block. | |
| UniqueID | getAttachTo () |
| Identifier of object to attach to once added to a game world. | |
| Connection | getConnection () |
| Connection to server or or null. | |
| bool | getEnableNetworking () |
| Enable networking for this stub. | |
| UniqueID | getID () |
| Unique identifier of object. | |
| DMatrix | getMatrix () |
| Stub matrix. | |
| NetworkState | getNetworkState () |
| Network state provided by server or null. | |
| DVector | getPosition () |
| Position. | |
| Vector | getRotation () |
| Rotation. | |
| Vector | getScaling () |
| Scaling if sizable. | |
| StubElementTexture | getTextureAt (int index) |
| Texture at index. | |
| int | getTextureCount () |
| Number of textures. | |
| StubElementTexture | getTextureNamed (String name) |
| Named texture or null if not found. | |
| void | loadAndAddElement (PersistencyEnvironment env, FileReader reader, GameWorld gameWorld) |
| Load element using file reader and add it to game world. | |
| Element | loadElement (PersistencyEnvironment env, FileReader reader) |
| Load element using file reader. | |
| StubElement | new (ElementClass eclass) |
| Create element stub. | |
| StubElement | new (ElementClass eclass, UniqueID id) |
| Create element stub. | |
| StubElement | new (ElementClass eclass, UniqueID id, StubWithProperties properties) |
| Create element stub. | |
| StubElement | new (StubElement stub) |
| Create copy of element stub. | |
| void | preloadResources () |
| Preload resources. | |
| void | removeAllAttachableBehaviors () |
| Remove all attachable behaviors. | |
| void | removeAllTextures () |
| Remove all textures. | |
| void | removeAttachableBehavior (String factoryId) |
| Remove attachable behavior. | |
| void | removeTexture (StubElementTexture texture) |
| Remove texture. | |
| void | setAttachTo (UniqueID id) |
| Set dentifier of object to attach to once added to a game world. | |
| void | setClass (ElementClass elementClass) |
| Set element class. | |
| void | setConnection (Connection connection) |
| Set connection to server or null. | |
| void | setEnableNetworking (bool enable) |
| Set if networking is enabled for this stub. | |
| void | setID (UniqueID id) |
| Set unique identifier of object. | |
| void | setNetworkState (NetworkState networkState) |
| Set network state provided by server or null. | |
| void | setPosition (DVector position) |
| Set position. | |
| void | setRotation (Vector rotation) |
| Set rotation. | |
| void | setScaling (Vector scaling) |
| Set scaling if sizable. | |
| 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. | |
Static Public Member Functions | |
| static StubElement | readFromFile (FileReader reader, ElementClassList elementClassList) |
| Read stub from file. | |
Public Attributes | |
| Array | pAddAttachableBehaviors |
| ElementClass | pClass |
| Connection | pConnection |
| PreloadCounter | pCounter |
| bool | pEnableNetworking |
| UniqueID | pID |
| DMatrix | pMatrix |
| NetworkState | pNetworkState |
| DVector | pPosition |
| Vector | pRotation |
| Array | pTextures |
| Public Attributes inherited from Dragengine.Preloading.StubWithProperties | |
| Dictionary | pProperties |
| Properties. | |
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.addAttachableBehavior | ( | String | factoryId | ) |
| void Dragengine.Preloading.StubElement.createAndAddElement | ( | GameWorld | gameWorld | ) |
Create element and add it to game world.
Reimplemented in Dragengine.Preloading.StubElementClassNotFound.
References getAttachTo().
Referenced by writeToFile().
| void Dragengine.Preloading.StubElement.forEachAttachableBehavior | ( | Block | ablock | ) |
Visit attachable behaviors using block.
Block has signature (String) or (int, String).
References new(), and setID().
Referenced by writeToFile().
| void Dragengine.Preloading.StubElement.forEachTexture | ( | Block | ablock | ) |
Visit textures with a block.
References new(), pRotation, and setRotation().
Referenced by writeToFile().
| UniqueID Dragengine.Preloading.StubElement.getAttachTo | ( | ) |
Identifier of object to attach to once added to a game world.
References pTextures.
Referenced by createAndAddElement().
| Connection Dragengine.Preloading.StubElement.getConnection | ( | ) |
Connection to server or or null.
Referenced by loadAndAddElement().
| bool Dragengine.Preloading.StubElement.getEnableNetworking | ( | ) |
| UniqueID Dragengine.Preloading.StubElement.getID | ( | ) |
Unique identifier of object.
Referenced by removeAllAttachableBehaviors().
| DMatrix Dragengine.Preloading.StubElement.getMatrix | ( | ) |
Stub matrix.
References new(), and pAddAttachableBehaviors.
Referenced by removeAttachableBehavior().
| NetworkState Dragengine.Preloading.StubElement.getNetworkState | ( | ) |
| DVector Dragengine.Preloading.StubElement.getPosition | ( | ) |
Position.
References new(), pAddAttachableBehaviors, and pEnableNetworking.
Referenced by setNetworkState().
| Vector Dragengine.Preloading.StubElement.getRotation | ( | ) |
Rotation.
References Dragengine.Preloading.StubWithProperties.setFrom().
Referenced by getTextureAt().
| Vector Dragengine.Preloading.StubElement.getScaling | ( | ) |
| StubElementTexture Dragengine.Preloading.StubElement.getTextureAt | ( | int | index | ) |
| int Dragengine.Preloading.StubElement.getTextureCount | ( | ) |
| StubElementTexture Dragengine.Preloading.StubElement.getTextureNamed | ( | String | name | ) |
| 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.
References getConnection(), pConnection, and setAttachTo().
Referenced by writeToFile().
| Element Dragengine.Preloading.StubElement.loadElement | ( | PersistencyEnvironment | env, |
| FileReader | reader ) |
Load element using file reader.
Reimplemented in Dragengine.Preloading.StubElementClassNotFound.
Referenced by writeToFile().
| StubElement Dragengine.Preloading.StubElement.new | ( | ElementClass | eclass | ) |
Create element stub.
References new().
Referenced by forEachAttachableBehavior(), forEachTexture(), getMatrix(), getPosition(), new(), new(), new(), new(), removeAllTextures(), setClass(), setConnection(), setEnableNetworking(), setPosition(), setRotation(), and writeToFile().
| StubElement Dragengine.Preloading.StubElement.new | ( | ElementClass | eclass, |
| UniqueID | id ) |
Create element stub.
References new().
| StubElement Dragengine.Preloading.StubElement.new | ( | ElementClass | eclass, |
| UniqueID | id, | ||
| StubWithProperties | properties ) |
Create element stub.
References new().
| StubElement Dragengine.Preloading.StubElement.new | ( | StubElement | stub | ) |
Create copy of element stub.
Reimplemented in Dragengine.Preloading.StubElementClassNotFound.
| void Dragengine.Preloading.StubElement.preloadResources | ( | ) |
|
static |
Read stub from file.
If the element class is not found an instance of StubElementClassNotFound is returned.
Reimplemented in Dragengine.Preloading.StubElementClassNotFound.
References pConnection, and setConnection().
Referenced by writeToFile().
| void Dragengine.Preloading.StubElement.removeAllAttachableBehaviors | ( | ) |
Remove all attachable behaviors.
References getID(), pID, and pMatrix.
Referenced by writeToFile().
| void Dragengine.Preloading.StubElement.removeAllTextures | ( | ) |
| void Dragengine.Preloading.StubElement.removeAttachableBehavior | ( | String | factoryId | ) |
Remove attachable behavior.
References getMatrix(), and pMatrix.
Referenced by writeToFile().
| void Dragengine.Preloading.StubElement.removeTexture | ( | StubElementTexture | texture | ) |
| void Dragengine.Preloading.StubElement.setAttachTo | ( | UniqueID | id | ) |
Set dentifier of object to attach to once added to a game world.
References pClass.
Referenced by loadAndAddElement().
| void Dragengine.Preloading.StubElement.setClass | ( | ElementClass | elementClass | ) |
| void Dragengine.Preloading.StubElement.setConnection | ( | Connection | connection | ) |
| void Dragengine.Preloading.StubElement.setEnableNetworking | ( | bool | enable | ) |
Set if networking is enabled for this stub.
References new(), and setPosition().
Referenced by writeToFile().
| void Dragengine.Preloading.StubElement.setID | ( | UniqueID | id | ) |
| void Dragengine.Preloading.StubElement.setNetworkState | ( | NetworkState | networkState | ) |
Set network state provided by server or null.
References getPosition().
Referenced by writeToFile().
| void Dragengine.Preloading.StubElement.setPosition | ( | DVector | position | ) |
| void Dragengine.Preloading.StubElement.setRotation | ( | Vector | rotation | ) |
| void Dragengine.Preloading.StubElement.setScaling | ( | Vector | scaling | ) |
Set scaling if sizable.
References pEnableNetworking, pID, and pTextures.
Referenced by removeAllTextures().
| void Dragengine.Preloading.StubElement.writeToFile | ( | FileWriter | writer | ) |
Write stub to file.
Reimplemented in Dragengine.Preloading.StubElementClassNotFound.
References addAttachableBehavior(), createAndAddElement(), forEachAttachableBehavior(), forEachTexture(), getEnableNetworking(), getNetworkState(), getTextureAt(), getTextureCount(), getTextureNamed(), loadAndAddElement(), loadElement(), new(), pAddAttachableBehaviors, pClass, pEnableNetworking, pID, pNetworkState, pPosition, preloadResources(), pRotation, pTextures, readFromFile(), Dragengine.Preloading.StubWithProperties.readPropertiesFromFile(), removeAllAttachableBehaviors(), removeAllTextures(), removeAttachableBehavior(), removeTexture(), setEnableNetworking(), setNetworkState(), Dragengine.Preloading.StubWithProperties.writePropertiesToFile(), and writeToFile().
Referenced by writeToFile().
| Array Dragengine.Preloading.StubElement.pAddAttachableBehaviors |
Referenced by getMatrix(), getPosition(), and writeToFile().
| ElementClass Dragengine.Preloading.StubElement.pClass |
Referenced by getNetworkState(), new(), setAttachTo(), setRotation(), and writeToFile().
| Connection Dragengine.Preloading.StubElement.pConnection |
Referenced by loadAndAddElement(), and readFromFile().
| PreloadCounter Dragengine.Preloading.StubElement.pCounter |
Referenced by setID().
| bool Dragengine.Preloading.StubElement.pEnableNetworking |
Referenced by getPosition(), setScaling(), and writeToFile().
| UniqueID Dragengine.Preloading.StubElement.pID |
Referenced by preloadResources(), removeAllAttachableBehaviors(), setClass(), setScaling(), and writeToFile().
| DMatrix Dragengine.Preloading.StubElement.pMatrix |
| NetworkState Dragengine.Preloading.StubElement.pNetworkState |
Referenced by writeToFile().
| DVector Dragengine.Preloading.StubElement.pPosition |
Referenced by getEnableNetworking(), getScaling(), getTextureCount(), new(), and writeToFile().
| Vector Dragengine.Preloading.StubElement.pRotation |
Referenced by forEachTexture(), getScaling(), getTextureNamed(), new(), and writeToFile().
| Array Dragengine.Preloading.StubElement.pTextures |
Referenced by getAttachTo(), setClass(), setScaling(), and writeToFile().