Drag[en]gine Script Module DragonScript
1.23
|
Behavior instance. More...
Public Member Functions | |
void | addListener (Listener listener) |
Add listener. More... | |
void | addListenerFactory (Block blockFactory) |
Add listener factory using block. More... | |
void | addListenerFactory (ListenerFactory factory) |
Add listener factory. More... | |
void | addToGameWorld () |
Add element to game world. More... | |
bool | canTouchGrabSpot (ECBehaviorGrabSpot.Instance grabSpot) |
Determine if grab spot can be touched by this grabber. More... | |
ECBehaviorGrabSpot.Instance | closestTouchingGrabSpot () |
Closest touched grab spot closest or null if not found. More... | |
ECBehaviorGrabSpot.Instance | closestTouchingGrabSpot (Block ablock) |
Closest touched grab spot closest or null if not found. More... | |
void | createListeners (Instance instance) |
Create listeners from factories adding them to behavior instance. More... | |
void | dispose () |
Dispose of claim spot. More... | |
void | dispose () |
Dispose of behavior. More... | |
ECBehaviorGrabSpot.Instance | findTouchingGrabSpot (Block ablock) |
Find touching grab spot with block. More... | |
void | forEachListenerFactory (Block ablock) |
Visit listener factories with block with argument ListenerFactory. More... | |
void | forEachTouchingGrabSpot (Block ablock) |
Visit touching grab spots with block. More... | |
ECComposeAttachResource | getAttach () |
Attach resource. More... | |
ECBehaviorCollider.Instance | getCollider () |
Collider behavior instance or null if not used. More... | |
ECBehaviorCollider | getCollider () |
Collider behavior or null if not used. More... | |
ECComposeCollisionFilter | getCollisionFilter () |
Collision filter. More... | |
ECBehaviorGrabber | getECBehavior () |
Behavior. More... | |
bool | getEnabled () |
Enable grabber. More... | |
ECPShapeList | getShape () |
Touch shape. More... | |
ECBehaviorGrabSpot.Instance | getTouchingGrabSpotAt (int index) |
Touching grab spots at index. More... | |
int | getTouchingGrabSpotCount () |
Count of touching grab spots. More... | |
TouchSensor | getTouchSensor () |
Touch sensor. More... | |
ECBehaviorVRHand.Instance | getVRHand () |
VR Hand behavior instance or null if not used. More... | |
ECBehaviorVRHand | getVRHand () |
VR Hand behavior or null if not used. More... | |
void | grab (ECBehaviorGrabSpot.Instance spot) |
Grab grab spot. More... | |
void | init (StubElement stub) |
Initialize behavior from stub. More... | |
bool | isGrabSpotTouching (ECBehaviorGrabSpot.Instance grabSpot) |
Grab spot is touching. More... | |
Instance | new (BehaviorElementClass eclass, ECBehaviorCollider collider) |
Create behavior element class. More... | |
Instance | new (BehaviorElementClass eclass, ECBehaviorCollider collider, String id) |
Create behavior element class. More... | |
Instance | new (BehaviorElementClass eclass, ECBehaviorVRHand vrHand, ECBehaviorCollider collider, String id, String prefix) |
Create behavior element class. More... | |
Instance | new (BehaviorElementClass eclass, ECBehaviorVRHand vrHand, String id) |
Create behavior element class. More... | |
Instance | new (ECBehaviorGrabber ecbehavior, BehaviorElement element) |
Create element. More... | |
void | regrab (ECBehaviorGrabSpot.Instance grabSpot) |
Safely grab a different grab spot. More... | |
void | release () |
Release grab spot if grabbing one. More... | |
void | removeFromGameWorld () |
Remove element from game world. More... | |
void | removeListener (Listener listener) |
Remove listener. More... | |
void | setEnabled (bool enabled) |
Enable/disable grabber. More... | |
void | setGrabSpot (ECBehaviorGrabSpot.Instance grabSpot) |
Set grabbed grab spot. More... | |
ECBehaviorGrabSpot.Instance | touchingGrabSpotClosestTo (DVector position) |
Touched grab spot closest to position or null if not found. More... | |
ECBehaviorGrabSpot.Instance | touchingGrabSpotClosestTo (DVector position, Block ablock) |
Touched grab spot closest to position or null if not found. More... | |
Public Member Functions inherited from Dragengine.Scenery.DefaultECBehaviorInstance | |
void | attachToParent (Element parent) |
Attach element to object set by the mapper in the IGDE World Editor. 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... | |
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... | |
Public Member Functions inherited from Dragengine.Scenery.TouchSensorListener | |
void | colliderEntered (Collider collider) |
Collider entered shape. More... | |
void | colliderLeft (Collider collider) |
Collider left shape. More... | |
Static Public Member Functions | |
static ECBehaviorGrabber | getBehaviorIn (BehaviorElementClass eclass) |
Get behavior in element class or null if absent. More... | |
Protected Member Functions | |
void | addTouchingGrabSpot (Collider collider, ECBehaviorGrabSpot.Instance grabSpot) |
Add touching grab spot. More... | |
void | addTouchingGrabSpot (ECBehaviorGrabSpot.Instance grabSpot) |
void | attachTouchSensor (StubElement stub, ECBehaviorCollider.Instance collider) |
Attach touch sensor to collider. More... | |
void | attachTouchSensor (StubElement stub, ECBehaviorVRHand.Instance vrHand) |
Attach touch sensor to VR hand. More... | |
TouchSensor | createTouchSensor (StubElement stub) |
Create touch sensor. More... | |
void | removeTouchingGrabSpot (ECBehaviorGrabSpot.Instance grabSpot) |
Remove touching grab spot. 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.ECBehaviorGrabber.Instance.addListener | ( | Listener | listener | ) |
Add listener.
void Dragengine.Scenery.ECBehaviorGrabber.Instance.addListenerFactory | ( | Block | blockFactory | ) |
void Dragengine.Scenery.ECBehaviorGrabber.Instance.addListenerFactory | ( | ListenerFactory | factory | ) |
Add listener factory.
void Dragengine.Scenery.ECBehaviorGrabber.Instance.addToGameWorld | ( | ) |
Add element to game world.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
|
protected |
Add touching grab spot.
|
protected |
|
protected |
Attach touch sensor to collider.
Default implementation calls ECComposeAttachResource.attach().
|
protected |
Attach touch sensor to VR hand.
Default implementation calls ECComposeAttachResource.attach().
bool Dragengine.Scenery.ECBehaviorGrabber.Instance.canTouchGrabSpot | ( | ECBehaviorGrabSpot.Instance | grabSpot | ) |
Determine if grab spot can be touched by this grabber.
Calls canTouchGrabSpot() on all listeners and checks grab spot enabled state.
ECBehaviorGrabSpot.Instance Dragengine.Scenery.ECBehaviorGrabber.Instance.closestTouchingGrabSpot | ( | ) |
Closest touched grab spot closest or null if not found.
Uses the grab slot touch collider position and grabber touch sensor position to calculate distance.
ECBehaviorGrabSpot.Instance Dragengine.Scenery.ECBehaviorGrabber.Instance.closestTouchingGrabSpot | ( | Block | ablock | ) |
Closest touched grab spot closest or null if not found.
Same as closestTouchingGrabSpot() but allows to filter grab spots using a block. Block is called with signature (ECBehaviorGrabSpot.Instance) and has to return true to consider the grab spot or false to ignore it.
void Dragengine.Scenery.ECBehaviorGrabber.Instance.createListeners | ( | Instance | instance | ) |
Create listeners from factories adding them to behavior instance.
|
protected |
Create touch sensor.
void Dragengine.Scenery.ECBehaviorGrabber.Instance.dispose | ( | ) |
Dispose of claim spot.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
void Dragengine.Scenery.ECBehaviorGrabber.Instance.dispose | ( | ) |
Dispose of behavior.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
ECBehaviorGrabSpot.Instance Dragengine.Scenery.ECBehaviorGrabber.Instance.findTouchingGrabSpot | ( | Block | ablock | ) |
Find touching grab spot with block.
Block is called with signature (ECBehaviorGrabSpot.Instance) or (int index, ECBehaviorGrabSpot.Instance) both returning true if found or false to continue searching.
Returns null if no matching grab spot is found.
void Dragengine.Scenery.ECBehaviorGrabber.Instance.forEachListenerFactory | ( | Block | ablock | ) |
Visit listener factories with block with argument ListenerFactory.
void Dragengine.Scenery.ECBehaviorGrabber.Instance.forEachTouchingGrabSpot | ( | Block | ablock | ) |
Visit touching grab spots with block.
Block is called with signature (ECBehaviorGrabSpot.Instance) or (int index, ECBehaviorGrabSpot.Instance).
ECComposeAttachResource Dragengine.Scenery.ECBehaviorGrabber.Instance.getAttach | ( | ) |
Attach resource.
|
static |
Get behavior in element class or null if absent.
Use this method to check if a particular BehaviorElementClass contains a behavior of type ECBehaviorComponent.
ECBehaviorCollider.Instance Dragengine.Scenery.ECBehaviorGrabber.Instance.getCollider | ( | ) |
Collider behavior instance or null if not used.
ECBehaviorCollider Dragengine.Scenery.ECBehaviorGrabber.Instance.getCollider | ( | ) |
Collider behavior or null if not used.
ECComposeCollisionFilter Dragengine.Scenery.ECBehaviorGrabber.Instance.getCollisionFilter | ( | ) |
Collision filter.
ECBehaviorGrabber Dragengine.Scenery.ECBehaviorGrabber.Instance.getECBehavior | ( | ) |
Behavior.
bool Dragengine.Scenery.ECBehaviorGrabber.Instance.getEnabled | ( | ) |
Enable grabber.
ECPShapeList Dragengine.Scenery.ECBehaviorGrabber.Instance.getShape | ( | ) |
Touch shape.
ECBehaviorGrabSpot.Instance Dragengine.Scenery.ECBehaviorGrabber.Instance.getTouchingGrabSpotAt | ( | int | index | ) |
Touching grab spots at index.
int Dragengine.Scenery.ECBehaviorGrabber.Instance.getTouchingGrabSpotCount | ( | ) |
Count of touching grab spots.
TouchSensor Dragengine.Scenery.ECBehaviorGrabber.Instance.getTouchSensor | ( | ) |
Touch sensor.
ECBehaviorVRHand.Instance Dragengine.Scenery.ECBehaviorGrabber.Instance.getVRHand | ( | ) |
VR Hand behavior instance or null if not used.
ECBehaviorVRHand Dragengine.Scenery.ECBehaviorGrabber.Instance.getVRHand | ( | ) |
VR Hand behavior or null if not used.
void Dragengine.Scenery.ECBehaviorGrabber.Instance.grab | ( | ECBehaviorGrabSpot.Instance | spot | ) |
Grab grab spot.
EInvalidParam | spot is null. |
EInvalidParam | Already grabbing a grab spot. |
EInvalidParam | spot is not grabbed. |
void Dragengine.Scenery.ECBehaviorGrabber.Instance.init | ( | StubElement | stub | ) |
Initialize behavior from stub.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
bool Dragengine.Scenery.ECBehaviorGrabber.Instance.isGrabSpotTouching | ( | ECBehaviorGrabSpot.Instance | grabSpot | ) |
Grab spot is touching.
Instance Dragengine.Scenery.ECBehaviorGrabber.Instance.new | ( | BehaviorElementClass | eclass, |
ECBehaviorCollider | collider | ||
) |
Create behavior element class.
Instance Dragengine.Scenery.ECBehaviorGrabber.Instance.new | ( | BehaviorElementClass | eclass, |
ECBehaviorCollider | collider, | ||
String | id | ||
) |
Create behavior element class.
Instance Dragengine.Scenery.ECBehaviorGrabber.Instance.new | ( | BehaviorElementClass | eclass, |
ECBehaviorVRHand | vrHand, | ||
ECBehaviorCollider | collider, | ||
String | id, | ||
String | prefix | ||
) |
Create behavior element class.
These behavior can be null:
Instance Dragengine.Scenery.ECBehaviorGrabber.Instance.new | ( | BehaviorElementClass | eclass, |
ECBehaviorVRHand | vrHand, | ||
String | id | ||
) |
Create behavior element class.
Instance Dragengine.Scenery.ECBehaviorGrabber.Instance.new | ( | ECBehaviorGrabber | ecbehavior, |
BehaviorElement | element | ||
) |
Create element.
void Dragengine.Scenery.ECBehaviorGrabber.Instance.regrab | ( | ECBehaviorGrabSpot.Instance | grabSpot | ) |
void Dragengine.Scenery.ECBehaviorGrabber.Instance.release | ( | ) |
Release grab spot if grabbing one.
void Dragengine.Scenery.ECBehaviorGrabber.Instance.removeFromGameWorld | ( | ) |
Remove element from game world.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
void Dragengine.Scenery.ECBehaviorGrabber.Instance.removeListener | ( | Listener | listener | ) |
Remove listener.
|
protected |
Remove touching grab spot.
void Dragengine.Scenery.ECBehaviorGrabber.Instance.setEnabled | ( | bool | enabled | ) |
Enable/disable grabber.
void Dragengine.Scenery.ECBehaviorGrabber.Instance.setGrabSpot | ( | ECBehaviorGrabSpot.Instance | grabSpot | ) |
Set grabbed grab spot.
ECBehaviorGrabSpot.Instance Dragengine.Scenery.ECBehaviorGrabber.Instance.touchingGrabSpotClosestTo | ( | DVector | position | ) |
Touched grab spot closest to position or null if not found.
Uses the grab slot touch collider position to calculate distance.
ECBehaviorGrabSpot.Instance Dragengine.Scenery.ECBehaviorGrabber.Instance.touchingGrabSpotClosestTo | ( | DVector | position, |
Block | ablock | ||
) |
Touched grab spot closest to position or null if not found.
Same as touchingGrabSpotClosestTo(DVector) but allows to filter grab spots using a block. Block is called with signature (ECBehaviorGrabSpot.Instance) and has to return true to consider the grab spot or false to ignore it.
ECBehaviorCollider.Instance Dragengine.Scenery.ECBehaviorGrabber.Instance.pCollider |
ECBehaviorGrabber Dragengine.Scenery.ECBehaviorGrabber.Instance.pECBehavior |
ElementResolver Dragengine.Scenery.ECBehaviorGrabber.Instance.pElementResolver |
bool Dragengine.Scenery.ECBehaviorGrabber.Instance.pEnabled |
ECBehaviorGrabSpot.Instance Dragengine.Scenery.ECBehaviorGrabber.Instance.pGrabSpot |
Array Dragengine.Scenery.ECBehaviorGrabber.Instance.pListeners |
Array Dragengine.Scenery.ECBehaviorGrabber.Instance.pTouchingGrabSpots |
TouchSensor Dragengine.Scenery.ECBehaviorGrabber.Instance.pTouchSensor |
Array Dragengine.Scenery.ECBehaviorGrabber.Instance.pTrackedGrabSpots |
ECBehaviorVRHand.Instance Dragengine.Scenery.ECBehaviorGrabber.Instance.pVRHand |