Drag[en]gine Script Module DragonScript  1.23
Dragengine.Scenery.ECComposeAttachResource Class Reference

Composable attachable resource for element class. More...

Inheritance diagram for Dragengine.Scenery.ECComposeAttachResource:

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...
 

Detailed Description

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.

Member Function Documentation

◆ attach()

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:

◆ getBone()

ECPString Dragengine.Scenery.ECComposeAttachResource.getBone ( )

Name of bone to attach to null if not used.

◆ getOrientation()

ECPVector Dragengine.Scenery.ECComposeAttachResource.getOrientation ( )

Attach orientation.

◆ getPosition()

ECPVector Dragengine.Scenery.ECComposeAttachResource.getPosition ( )

Attach position.

◆ getPrefix()

String Dragengine.Scenery.ECComposeAttachResource.getPrefix ( )

Property prefix.

◆ new() [1/2]

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.

◆ new() [2/2]

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'.


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