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 | clearTestCollider () |
Clear test collider reverting to ray-tracing. More... | |
void | createListeners (Instance instance) |
Create listeners from factories adding them to behavior instance. More... | |
void | dispose () |
Dispose of composeable instance. More... | |
void | dispose () |
Dispose of behavior. More... | |
void | forEachListenerFactory (Block ablock) |
Visit listener factories with block with argument ListenerFactory. More... | |
ECBehaviorCollider.Instance | getCollider () |
Collider behavior instance. More... | |
ECBehaviorCollider | getCollider () |
Collider behavior or null. More... | |
ECBehaviorColliderAI.Instance | getColliderAI () |
ColliderAI behavior instance. More... | |
ECBehaviorColliderAI | getColliderAI () |
Collider AI behavior or null. More... | |
ECComposeCollisionFilter | getCollisionFilter () |
Collision filter for AI collider. More... | |
ECBehaviorComponent.Instance | getComponent () |
Component behavior instance or null if not used. More... | |
ECBehaviorComponent | getComponent () |
Component behavior or null. More... | |
ECBehaviorLookAt | getECBehavior () |
Behavior. More... | |
bool | getEnabled () |
Enable look-at. More... | |
ECBehaviorLocomotion.Instance | getLocomotion () |
Locomotion behavior instance or null if not used. More... | |
ECBehaviorLocomotion | getLocomotion () |
Locomotion behavior or null. More... | |
BehaviorElement | getLookAtBehaviorElement () |
Look-at element if of type BehaviorElement or null. More... | |
int | getLookAtBone () |
Look-at bone or -1. More... | |
String | getLookAtBoneName () |
Look-at bone name or null. More... | |
DVector | getLookAtDirection () |
Test direction used for last look-at test. More... | |
float | getLookAtDistance () |
Distance in meters to look-at hit point. More... | |
Element | getLookAtElement () |
Look-at element or null. More... | |
DVector | getLookAtHitPoint () |
Look-at hit point or null. More... | |
DVector | getLookAtOrigin () |
Test origin used for last look-at test. More... | |
Vector | getOrigin () |
Test origin. More... | |
ECPVector | getOrigin () |
Test origin. More... | |
float | getRange () |
Test range. More... | |
ECPFloat | getRange () |
Test range. More... | |
String | getTestBone () |
Name of test bone name or null to use component. More... | |
ECPString | getTestBone () |
Test bone. More... | |
bool | getUseLocomotion () |
Use locomotion. More... | |
bool | hasLookAtElement () |
Is looking at an element. More... | |
bool | hasNotLookAtElement () |
Is not looking at an element. More... | |
void | init (StubElement stub) |
Initialize element from stub. More... | |
Instance | new (BehaviorElementClass eclass, ECBehaviorCollider collider, ECBehaviorComponent component, ECBehaviorLocomotion locomotion) |
Instance | new (BehaviorElementClass eclass, ECBehaviorCollider collider, ECBehaviorComponent component, ECBehaviorLocomotion locomotion, String prefix) |
Instance | new (BehaviorElementClass eclass, ECBehaviorColliderAI colliderAI, ECBehaviorComponent component, ECBehaviorLocomotion locomotion) |
Create behavior element class. More... | |
Instance | new (BehaviorElementClass eclass, ECBehaviorColliderAI colliderAI, ECBehaviorComponent component, ECBehaviorLocomotion locomotion, String prefix) |
Instance | new (ECBehaviorLookAt ecbehavior, BehaviorElement element) |
Create element. More... | |
void | postThink (float elapsed) |
Post thinking after physics processing is finished. More... | |
void | removeListener (Listener listener) |
Remove listener. More... | |
void | setCollisionFilter (CollisionFilter filter) |
Set test collision filter. More... | |
void | setEnabled (bool enabled) |
Set if look-at is enabled. More... | |
void | setLookAtElement (Element element, int bone, String boneName, float distance) |
Set look-at element. More... | |
void | setRange (float range) |
Set test range. More... | |
void | setSphereTestCollider (float radius) |
Set shape of test collider to sphere. 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 | 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 | 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... | |
Static Public Member Functions | |
static ECBehaviorLookAt | getBehaviorIn (BehaviorElementClass eclass) |
Get behavior in element class or null if absent. More... | |
Public Attributes | |
ECBehaviorCollider.Instance | pCollider |
ECBehaviorCollider | pCollider |
ECBehaviorColliderAI.Instance | pColliderAI |
ECBehaviorColliderAI | pColliderAI |
ECComposeCollisionFilter | pCollisionFilter |
ECBehaviorComponent.Instance | pComponent |
ECBehaviorComponent | pComponent |
ECBehaviorLookAt | pECBehavior |
bool | pHasOrigin |
Array | pListenerFactories |
Array | pListeners |
ECBehaviorLocomotion.Instance | pLocomotion |
ECBehaviorLocomotion | pLocomotion |
int | pLookAtBone |
String | pLookAtBoneName |
DVector | pLookAtDirection |
float | pLookAtDistance |
Element | pLookAtElement |
DVector | pLookAtHitPoint |
DVector | pLookAtOrigin |
Vector | pOrigin |
ECPVector | pOrigin |
float | pRange |
ECPFloat | pRange |
ColliderCollisionTest | pTest |
String | pTestBone |
ECPString | pTestBone |
bool | pUseLocomotion |
Protected Member Functions | |
void | evaluateTest () |
Evaluate last test. More... | |
ColliderCollisionTest | getTest () |
Collision test. More... | |
void | update (float elapsed) |
Update. More... | |
void | updateTestParameters () |
Update test parameters. 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.ECBehaviorLookAt.Instance.addListener | ( | Listener | listener | ) |
Add listener.
void Dragengine.Scenery.ECBehaviorLookAt.Instance.addListenerFactory | ( | Block | blockFactory | ) |
void Dragengine.Scenery.ECBehaviorLookAt.Instance.addListenerFactory | ( | ListenerFactory | factory | ) |
Add listener factory.
void Dragengine.Scenery.ECBehaviorLookAt.Instance.clearTestCollider | ( | ) |
Clear test collider reverting to ray-tracing.
void Dragengine.Scenery.ECBehaviorLookAt.Instance.createListeners | ( | Instance | instance | ) |
Create listeners from factories adding them to behavior instance.
void Dragengine.Scenery.ECBehaviorLookAt.Instance.dispose | ( | ) |
Dispose of composeable instance.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
void Dragengine.Scenery.ECBehaviorLookAt.Instance.dispose | ( | ) |
Dispose of behavior.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
|
protected |
Evaluate last test.
void Dragengine.Scenery.ECBehaviorLookAt.Instance.forEachListenerFactory | ( | Block | ablock | ) |
Visit listener factories with block with argument ListenerFactory.
|
static |
Get behavior in element class or null if absent.
Use this method to check if a particular BehaviorElementClass contains a behavior of type ECBehaviorLookAt.
ECBehaviorCollider.Instance Dragengine.Scenery.ECBehaviorLookAt.Instance.getCollider | ( | ) |
Collider behavior instance.
ECBehaviorCollider Dragengine.Scenery.ECBehaviorLookAt.Instance.getCollider | ( | ) |
Collider behavior or null.
ECBehaviorColliderAI.Instance Dragengine.Scenery.ECBehaviorLookAt.Instance.getColliderAI | ( | ) |
ColliderAI behavior instance.
ECBehaviorColliderAI Dragengine.Scenery.ECBehaviorLookAt.Instance.getColliderAI | ( | ) |
Collider AI behavior or null.
ECComposeCollisionFilter Dragengine.Scenery.ECBehaviorLookAt.Instance.getCollisionFilter | ( | ) |
Collision filter for AI collider.
ECBehaviorComponent.Instance Dragengine.Scenery.ECBehaviorLookAt.Instance.getComponent | ( | ) |
Component behavior instance or null if not used.
ECBehaviorComponent Dragengine.Scenery.ECBehaviorLookAt.Instance.getComponent | ( | ) |
Component behavior or null.
ECBehaviorLookAt Dragengine.Scenery.ECBehaviorLookAt.Instance.getECBehavior | ( | ) |
Behavior.
bool Dragengine.Scenery.ECBehaviorLookAt.Instance.getEnabled | ( | ) |
Enable look-at.
ECBehaviorLocomotion.Instance Dragengine.Scenery.ECBehaviorLookAt.Instance.getLocomotion | ( | ) |
Locomotion behavior instance or null if not used.
ECBehaviorLocomotion Dragengine.Scenery.ECBehaviorLookAt.Instance.getLocomotion | ( | ) |
Locomotion behavior or null.
BehaviorElement Dragengine.Scenery.ECBehaviorLookAt.Instance.getLookAtBehaviorElement | ( | ) |
Look-at element if of type BehaviorElement or null.
int Dragengine.Scenery.ECBehaviorLookAt.Instance.getLookAtBone | ( | ) |
Look-at bone or -1.
String Dragengine.Scenery.ECBehaviorLookAt.Instance.getLookAtBoneName | ( | ) |
Look-at bone name or null.
DVector Dragengine.Scenery.ECBehaviorLookAt.Instance.getLookAtDirection | ( | ) |
Test direction used for last look-at test.
float Dragengine.Scenery.ECBehaviorLookAt.Instance.getLookAtDistance | ( | ) |
Distance in meters to look-at hit point.
Element Dragengine.Scenery.ECBehaviorLookAt.Instance.getLookAtElement | ( | ) |
Look-at element or null.
DVector Dragengine.Scenery.ECBehaviorLookAt.Instance.getLookAtHitPoint | ( | ) |
Look-at hit point or null.
DVector Dragengine.Scenery.ECBehaviorLookAt.Instance.getLookAtOrigin | ( | ) |
Test origin used for last look-at test.
Vector Dragengine.Scenery.ECBehaviorLookAt.Instance.getOrigin | ( | ) |
Test origin.
ECPVector Dragengine.Scenery.ECBehaviorLookAt.Instance.getOrigin | ( | ) |
Test origin.
float Dragengine.Scenery.ECBehaviorLookAt.Instance.getRange | ( | ) |
Test range.
ECPFloat Dragengine.Scenery.ECBehaviorLookAt.Instance.getRange | ( | ) |
Test range.
|
protected |
Collision test.
String Dragengine.Scenery.ECBehaviorLookAt.Instance.getTestBone | ( | ) |
Name of test bone name or null to use component.
ECPString Dragengine.Scenery.ECBehaviorLookAt.Instance.getTestBone | ( | ) |
Test bone.
bool Dragengine.Scenery.ECBehaviorLookAt.Instance.getUseLocomotion | ( | ) |
Use locomotion.
bool Dragengine.Scenery.ECBehaviorLookAt.Instance.hasLookAtElement | ( | ) |
Is looking at an element.
bool Dragengine.Scenery.ECBehaviorLookAt.Instance.hasNotLookAtElement | ( | ) |
Is not looking at an element.
void Dragengine.Scenery.ECBehaviorLookAt.Instance.init | ( | StubElement | stub | ) |
Initialize element from stub.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
Instance Dragengine.Scenery.ECBehaviorLookAt.Instance.new | ( | BehaviorElementClass | eclass, |
ECBehaviorCollider | collider, | ||
ECBehaviorComponent | component, | ||
ECBehaviorLocomotion | locomotion | ||
) |
Instance Dragengine.Scenery.ECBehaviorLookAt.Instance.new | ( | BehaviorElementClass | eclass, |
ECBehaviorCollider | collider, | ||
ECBehaviorComponent | component, | ||
ECBehaviorLocomotion | locomotion, | ||
String | prefix | ||
) |
Instance Dragengine.Scenery.ECBehaviorLookAt.Instance.new | ( | BehaviorElementClass | eclass, |
ECBehaviorColliderAI | colliderAI, | ||
ECBehaviorComponent | component, | ||
ECBehaviorLocomotion | locomotion | ||
) |
Create behavior element class.
These values are optional and can be null: component, locomotion.
Instance Dragengine.Scenery.ECBehaviorLookAt.Instance.new | ( | BehaviorElementClass | eclass, |
ECBehaviorColliderAI | colliderAI, | ||
ECBehaviorComponent | component, | ||
ECBehaviorLocomotion | locomotion, | ||
String | prefix | ||
) |
Instance Dragengine.Scenery.ECBehaviorLookAt.Instance.new | ( | ECBehaviorLookAt | ecbehavior, |
BehaviorElement | element | ||
) |
Create element.
void Dragengine.Scenery.ECBehaviorLookAt.Instance.postThink | ( | float | elapsed | ) |
Post thinking after physics processing is finished.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
void Dragengine.Scenery.ECBehaviorLookAt.Instance.removeListener | ( | Listener | listener | ) |
Remove listener.
void Dragengine.Scenery.ECBehaviorLookAt.Instance.setCollisionFilter | ( | CollisionFilter | filter | ) |
Set test collision filter.
void Dragengine.Scenery.ECBehaviorLookAt.Instance.setEnabled | ( | bool | enabled | ) |
Set if look-at is enabled.
void Dragengine.Scenery.ECBehaviorLookAt.Instance.setLookAtElement | ( | Element | element, |
int | bone, | ||
String | boneName, | ||
float | distance | ||
) |
Set look-at element.
void Dragengine.Scenery.ECBehaviorLookAt.Instance.setRange | ( | float | range | ) |
Set test range.
void Dragengine.Scenery.ECBehaviorLookAt.Instance.setSphereTestCollider | ( | float | radius | ) |
Set shape of test collider to sphere.
By default no shape is set in which case ra-ytesting is used. Using shapes like a sphere is useful to enlarge the hit area for example with 3rd person views.
|
protected |
Update.
|
protected |
Update test parameters.
ECBehaviorCollider.Instance Dragengine.Scenery.ECBehaviorLookAt.Instance.pCollider |
ECBehaviorCollider Dragengine.Scenery.ECBehaviorLookAt.Instance.pCollider |
ECBehaviorColliderAI.Instance Dragengine.Scenery.ECBehaviorLookAt.Instance.pColliderAI |
ECBehaviorColliderAI Dragengine.Scenery.ECBehaviorLookAt.Instance.pColliderAI |
ECComposeCollisionFilter Dragengine.Scenery.ECBehaviorLookAt.Instance.pCollisionFilter |
ECBehaviorComponent.Instance Dragengine.Scenery.ECBehaviorLookAt.Instance.pComponent |
ECBehaviorComponent Dragengine.Scenery.ECBehaviorLookAt.Instance.pComponent |
ECBehaviorLookAt Dragengine.Scenery.ECBehaviorLookAt.Instance.pECBehavior |
bool Dragengine.Scenery.ECBehaviorLookAt.Instance.pHasOrigin |
Array Dragengine.Scenery.ECBehaviorLookAt.Instance.pListenerFactories |
Array Dragengine.Scenery.ECBehaviorLookAt.Instance.pListeners |
ECBehaviorLocomotion.Instance Dragengine.Scenery.ECBehaviorLookAt.Instance.pLocomotion |
ECBehaviorLocomotion Dragengine.Scenery.ECBehaviorLookAt.Instance.pLocomotion |
int Dragengine.Scenery.ECBehaviorLookAt.Instance.pLookAtBone |
String Dragengine.Scenery.ECBehaviorLookAt.Instance.pLookAtBoneName |
DVector Dragengine.Scenery.ECBehaviorLookAt.Instance.pLookAtDirection |
float Dragengine.Scenery.ECBehaviorLookAt.Instance.pLookAtDistance |
Element Dragengine.Scenery.ECBehaviorLookAt.Instance.pLookAtElement |
DVector Dragengine.Scenery.ECBehaviorLookAt.Instance.pLookAtHitPoint |
DVector Dragengine.Scenery.ECBehaviorLookAt.Instance.pLookAtOrigin |
Vector Dragengine.Scenery.ECBehaviorLookAt.Instance.pOrigin |
ECPVector Dragengine.Scenery.ECBehaviorLookAt.Instance.pOrigin |
float Dragengine.Scenery.ECBehaviorLookAt.Instance.pRange |
ECPFloat Dragengine.Scenery.ECBehaviorLookAt.Instance.pRange |
ColliderCollisionTest Dragengine.Scenery.ECBehaviorLookAt.Instance.pTest |
String Dragengine.Scenery.ECBehaviorLookAt.Instance.pTestBone |
ECPString Dragengine.Scenery.ECBehaviorLookAt.Instance.pTestBone |
bool Dragengine.Scenery.ECBehaviorLookAt.Instance.pUseLocomotion |