Drag[en]gine Script Module DragonScript
1.23
|
Composable attachable resource for element class. More...
Public Member Functions | |
void | attach (Collider collider, Object resource, StubElement stub) |
Attach resource to collider using stub. More... | |
ECPString | getBone () |
Name of bone to attach to null if not used. More... | |
ECPVector | getOrientation () |
Attach orientation. More... | |
ECPVector | getPosition () |
Attach position. More... | |
String | getPrefix () |
Property prefix. More... | |
ECComposeAttachResource | new (ElementClass ownerClass) |
Create composable element class. More... | |
ECComposeAttachResource | new (ElementClass ownerClass, String prefix) |
Create composable element class. More... | |
Composable attachable resource for element class.
Provides attachable resource support to element class without subclassing from a specific class. Multiple instances of ECComposeAttachResource can be used by using a property prefix. Supports attaching static or at a specific bone.
void Dragengine.Scenery.ECComposeAttachResource.attach | ( | Collider | collider, |
Object | resource, | ||
StubElement | stub | ||
) |
Attach resource to collider using stub.
Collider or resource can be null in which case nothing is done. If bone is not empty string collider has to be castable to ColliderRig.
The following object types can be attached:
ECPString Dragengine.Scenery.ECComposeAttachResource.getBone | ( | ) |
Name of bone to attach to null if not used.
ECPVector Dragengine.Scenery.ECComposeAttachResource.getOrientation | ( | ) |
Attach orientation.
ECPVector Dragengine.Scenery.ECComposeAttachResource.getPosition | ( | ) |
Attach position.
String Dragengine.Scenery.ECComposeAttachResource.getPrefix | ( | ) |
Property prefix.
ECComposeAttachResource Dragengine.Scenery.ECComposeAttachResource.new | ( | ElementClass | ownerClass | ) |
Create composable element class.
Adds all properties to ownerClass. If you do not want a property to be configurable using XML subclassing use ownerClass.removeProperty() to remove them.
ECComposeAttachResource Dragengine.Scenery.ECComposeAttachResource.new | ( | ElementClass | ownerClass, |
String | prefix | ||
) |
Create composable element class.
Adds all properties to ownerClass. If you do not want a property to be configurable using XML subclassing use ownerClass.removeProperty() to remove them. Properties are prefixed using prefix to allow multiple instances of this class to be used. If not empty prefix is typically of the form 'name.' which results for example in a property named 'name.position'.