Drag[en]gine Script Module DragonScript  1.21
Dragengine.Scenery.ECBehaviorAttachable.Instance Class Reference

Behavior instance. More...

Inheritance diagram for Dragengine.Scenery.ECBehaviorAttachable.Instance:
Dragengine.Scenery.DefaultECBehaviorInstance Dragengine.Scenery.ECBehaviorInstance

Public Member Functions

void addListener (Listener listener)
 Add listener. More...
 
void attach (ECBehaviorAttachSlot.Instance slot)
 Attach to attachment slot. More...
 
void attach (ECBehaviorAttachSlot.Instance slot, Vector position)
 
void attach (ECBehaviorAttachSlot.Instance slot, Vector position, Quaternion orientation)
 
void attachWorld (ECBehaviorAttachSlot.Instance slot)
 Attach to attachment slot using current world position. More...
 
void detach ()
 Detaches from slot if attached. More...
 
void detachAndDispose ()
 Detaches from slot if attached and safely disposes of the element. More...
 
void dispose ()
 Dispose of attach slot. More...
 
void enterFrame ()
 Frame update started. More...
 
ECBehaviorAttachSlot.Instance getAttachSlot ()
 Attach slot this element is attached to or null. More...
 
ECBehaviorCollider.Instance getCollider ()
 Owner element collider. More...
 
ECBehaviorAttachable getECBehavior ()
 Behavior. More...
 
ElementResolver getElementResolver ()
 Element resolver used during loading or null if not set. More...
 
void init (StubElement stub)
 Initialize behavior from stub. More...
 
Instance new (ECBehaviorAttachable ecbehavior, BehaviorElement element)
 Create element. More...
 
void readFromFile (PersistencyEnvironment env, FileReader reader)
 Read element from file. More...
 
void reattach (ECBehaviorAttachSlot.Instance slot)
 Safely reattaches to a different attachment slot. More...
 
void reattach (ECBehaviorAttachSlot.Instance slot, Vector position)
 
void reattach (ECBehaviorAttachSlot.Instance slot, Vector position, Quaternion orientation)
 
void reattachWorld (ECBehaviorAttachSlot.Instance slot)
 Safely reattaches to a different attachment slot using current world position. More...
 
void removeListener (Listener listener)
 Remove listener. More...
 
void setAttachSlot (ECBehaviorAttachSlot.Instance attachSlot)
 Set attach slot. More...
 
- Public Member Functions inherited from Dragengine.Scenery.DefaultECBehaviorInstance
void addToGameWorld ()
 Add element to game world. More...
 
void attachToParent (Element parent)
 Attach element to object set by the mapper in the IGDE World Editor. 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 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...
 

Additional Inherited Members

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

Detailed Description

Behavior instance.

Member Function Documentation

◆ addListener()

void Dragengine.Scenery.ECBehaviorAttachable.Instance.addListener ( Listener  listener)

Add listener.

◆ attach() [1/3]

void Dragengine.Scenery.ECBehaviorAttachable.Instance.attach ( ECBehaviorAttachSlot.Instance  slot)

Attach to attachment slot.

Exceptions
EInvalidParamslot is null.
EInvalidParamAlready attached to an attachment slot.
EInvalidParamOwner Element.getParent() is not null.
EInvalidParamslot is not empty.

◆ attach() [2/3]

void Dragengine.Scenery.ECBehaviorAttachable.Instance.attach ( ECBehaviorAttachSlot.Instance  slot,
Vector  position 
)

◆ attach() [3/3]

void Dragengine.Scenery.ECBehaviorAttachable.Instance.attach ( ECBehaviorAttachSlot.Instance  slot,
Vector  position,
Quaternion  orientation 
)

◆ attachWorld()

void Dragengine.Scenery.ECBehaviorAttachable.Instance.attachWorld ( ECBehaviorAttachSlot.Instance  slot)

Attach to attachment slot using current world position.

Version
1.9
Exceptions
EInvalidParamslot is null.
EInvalidParamAlready attached to an attachment slot.
EInvalidParamOwner Element.getParent() is not null.
EInvalidParamslot is not empty.

◆ detach()

void Dragengine.Scenery.ECBehaviorAttachable.Instance.detach ( )

Detaches from slot if attached.

◆ detachAndDispose()

void Dragengine.Scenery.ECBehaviorAttachable.Instance.detachAndDispose ( )

Detaches from slot if attached and safely disposes of the element.

◆ dispose()

void Dragengine.Scenery.ECBehaviorAttachable.Instance.dispose ( )

Dispose of attach slot.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ enterFrame()

void Dragengine.Scenery.ECBehaviorAttachable.Instance.enterFrame ( )

Frame update started.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ getAttachSlot()

ECBehaviorAttachSlot.Instance Dragengine.Scenery.ECBehaviorAttachable.Instance.getAttachSlot ( )

Attach slot this element is attached to or null.

◆ getCollider()

ECBehaviorCollider.Instance Dragengine.Scenery.ECBehaviorAttachable.Instance.getCollider ( )

Owner element collider.

◆ getECBehavior()

ECBehaviorAttachable Dragengine.Scenery.ECBehaviorAttachable.Instance.getECBehavior ( )

Behavior.

◆ getElementResolver()

ElementResolver Dragengine.Scenery.ECBehaviorAttachable.Instance.getElementResolver ( )

Element resolver used during loading or null if not set.

Version
1.9

◆ init()

void Dragengine.Scenery.ECBehaviorAttachable.Instance.init ( StubElement  stub)

Initialize behavior from stub.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ new()

Instance Dragengine.Scenery.ECBehaviorAttachable.Instance.new ( ECBehaviorAttachable  ecbehavior,
BehaviorElement  element 
)

Create element.

◆ readFromFile()

void Dragengine.Scenery.ECBehaviorAttachable.Instance.readFromFile ( PersistencyEnvironment  env,
FileReader  reader 
)

Read element from file.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ reattach() [1/3]

void Dragengine.Scenery.ECBehaviorAttachable.Instance.reattach ( ECBehaviorAttachSlot.Instance  slot)

Safely reattaches to a different attachment slot.

Convenience method for calling detach() then attach() but checking problems before calling detach(). This ensures the attachable stays attached to the old slot in case something is wrong.

Note
If the current attach slot is the same as the new attach slot nothing is done.

◆ reattach() [2/3]

void Dragengine.Scenery.ECBehaviorAttachable.Instance.reattach ( ECBehaviorAttachSlot.Instance  slot,
Vector  position 
)

◆ reattach() [3/3]

void Dragengine.Scenery.ECBehaviorAttachable.Instance.reattach ( ECBehaviorAttachSlot.Instance  slot,
Vector  position,
Quaternion  orientation 
)

◆ reattachWorld()

void Dragengine.Scenery.ECBehaviorAttachable.Instance.reattachWorld ( ECBehaviorAttachSlot.Instance  slot)

Safely reattaches to a different attachment slot using current world position.

Convenience method for calling detach() then attach() but checking problems before calling detach(). This ensures the attachable stays attached to the old slot in case something is wrong.

Note
If the current attach slot is the same as the new attach slot nothing is done.

◆ removeListener()

void Dragengine.Scenery.ECBehaviorAttachable.Instance.removeListener ( Listener  listener)

Remove listener.

◆ setAttachSlot()

void Dragengine.Scenery.ECBehaviorAttachable.Instance.setAttachSlot ( ECBehaviorAttachSlot.Instance  attachSlot)

Set attach slot.

Warning
For use by ECBehaviorAttachSlot only.

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