Drag[en]gine Script Module DragonScript
1.23
|
Behavior instance. More...
Classes | |
class | DefaultAttachElement |
Example attach element visitor. More... | |
Public Member Functions | |
void | addToAttachments (BehaviorElement parent) |
Add as attachment to ECBehaviorAttachments if parent has this behavior. More... | |
void | attachToAttachSlot (BehaviorElement parent) |
Attach to attach slot in world coordinates. More... | |
void | attachToBehaviorElement (BehaviorElement parent) |
Attach to behavior element. More... | |
void | attachToCollider (Collider collider) |
Attach to collider. More... | |
void | attachToParent (Element parent) |
Attach element to object set by the mapper in the IGDE World Editor. More... | |
void | dispose () |
Dispose of behavior instance. More... | |
ECBehaviorAttachable.Instance | getAttachable () |
Attachable behavior. More... | |
String | getAttachSlot () |
Attach slot to attach to. More... | |
String | getBone () |
Name of bone to attach to or empty string to attach statically. More... | |
ECBehaviorCollider.Instance | getCollider () |
Collider behavior. More... | |
ECBehaviorAttachToParent | getECBehavior () |
Behavior. More... | |
Quaternion | getOrientation () |
Explicit attach rotation. More... | |
Vector | getPosition () |
Explicit attach position. More... | |
bool | getRelative () |
Attach relative to world position or using explicit position. More... | |
bool | getRigMode () |
Attach using rig mode if supported by colliders. More... | |
void | init (StubElement stub) |
Initialize element from stub. More... | |
Instance | new (ECBehaviorAttachToParent ecbehavior, BehaviorElement element) |
Create element. More... | |
Public Member Functions inherited from Dragengine.Scenery.DefaultECBehaviorInstance | |
void | addToGameWorld () |
Add element to game world. More... | |
void | enterFrame () |
Frame update started. More... | |
void | geometryChanged () |
Position or orientation changed. More... | |
BehaviorElement | getElement () |
Behavior element to apply behavior to. More... | |
int | getInstanceIndex () |
Behavior instance index. More... | |
DefaultECBehaviorInstance | new (BehaviorElement element) |
Create default composeable instance. More... | |
void | postThink (float elapsed) |
Post thinking after physics processing is finished. More... | |
void | readFromFile (PersistencyEnvironment env, FileReader reader) |
Read behavior instance from file. More... | |
void | removeFromGameWorld () |
Remove element from game world. More... | |
bool | requiresEnterFrame () |
Behavior instance requires enterFrame() to be called. More... | |
bool | requiresThink () |
Behavior instance requires think() to be called. More... | |
void | stateChanged () |
State changed (visble, touchable). More... | |
void | think (float elapsed) |
Think about what to do for the next frame update. More... | |
void | writeToFile (PersistencyEnvironment env, FileWriter writer) |
Write behavior instance to file. More... | |
Protected Member Functions | |
ElementVisitor | getAttachVisitor () |
Element visitor used to attach elements or null to use default behavior. More... | |
void | setAttachVisitor (ElementVisitor visitor) |
Set element visitor used to attach elements or null to use default behavior. More... | |
Protected Member Functions inherited from Dragengine.Scenery.DefaultECBehaviorInstance | |
void | setRequiresEnterFrame (bool required) |
Set if behavior instance requires enterFrame() to be called. More... | |
void | setRequiresThink (bool required) |
Set if behavior instance requires think() to be called. More... | |
Behavior instance.
void Dragengine.Scenery.ECBehaviorAttachToParent.Instance.addToAttachments | ( | BehaviorElement | parent | ) |
Add as attachment to ECBehaviorAttachments if parent has this behavior.
void Dragengine.Scenery.ECBehaviorAttachToParent.Instance.attachToAttachSlot | ( | BehaviorElement | parent | ) |
Attach to attach slot in world coordinates.
Element has to be in the correct position before attaching.
void Dragengine.Scenery.ECBehaviorAttachToParent.Instance.attachToBehaviorElement | ( | BehaviorElement | parent | ) |
Attach to behavior element.
Calls attachToCollider() if behavior element has ECBehaviorCollider. Overwrite in subclass if you use only behavior elements and you do not want to use custom visitor.
void Dragengine.Scenery.ECBehaviorAttachToParent.Instance.attachToCollider | ( | Collider | collider | ) |
Attach to collider.
If collider is castable to ColliderRig and bone is not null the element is attach to the collider bone. Otherwise the element is attached statically.
void Dragengine.Scenery.ECBehaviorAttachToParent.Instance.attachToParent | ( | Element | parent | ) |
Attach element to object set by the mapper in the IGDE World Editor.
Behavior instance is responsible to call BehaviorElement.setParent() if the attaching succeedes. If multiple behaviors support attaching they have to negotiate with each other who does the attaching for example by using BehaviorElement.getParent().
Implementation either visits the element using getAttachVisitor() or by calling attachToBehaviorElement() if the element is castable to BehaviorElement.
Furthermore If the parent has ECBehaviorAttachments behavior add element as attachment. This is not done if special attaching is used like ECBehaviorAttachSlot.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
void Dragengine.Scenery.ECBehaviorAttachToParent.Instance.dispose | ( | ) |
Dispose of behavior instance.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
ECBehaviorAttachable.Instance Dragengine.Scenery.ECBehaviorAttachToParent.Instance.getAttachable | ( | ) |
Attachable behavior.
String Dragengine.Scenery.ECBehaviorAttachToParent.Instance.getAttachSlot | ( | ) |
Attach slot to attach to.
|
protected |
Element visitor used to attach elements or null to use default behavior.
String Dragengine.Scenery.ECBehaviorAttachToParent.Instance.getBone | ( | ) |
Name of bone to attach to or empty string to attach statically.
ECBehaviorCollider.Instance Dragengine.Scenery.ECBehaviorAttachToParent.Instance.getCollider | ( | ) |
Collider behavior.
ECBehaviorAttachToParent Dragengine.Scenery.ECBehaviorAttachToParent.Instance.getECBehavior | ( | ) |
Behavior.
Quaternion Dragengine.Scenery.ECBehaviorAttachToParent.Instance.getOrientation | ( | ) |
Explicit attach rotation.
Vector Dragengine.Scenery.ECBehaviorAttachToParent.Instance.getPosition | ( | ) |
Explicit attach position.
bool Dragengine.Scenery.ECBehaviorAttachToParent.Instance.getRelative | ( | ) |
Attach relative to world position or using explicit position.
bool Dragengine.Scenery.ECBehaviorAttachToParent.Instance.getRigMode | ( | ) |
Attach using rig mode if supported by colliders.
void Dragengine.Scenery.ECBehaviorAttachToParent.Instance.init | ( | StubElement | stub | ) |
Initialize element from stub.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
Instance Dragengine.Scenery.ECBehaviorAttachToParent.Instance.new | ( | ECBehaviorAttachToParent | ecbehavior, |
BehaviorElement | element | ||
) |
Create element.
|
protected |
Set element visitor used to attach elements or null to use default behavior.