Drag[en]gine Script Module DragonScript
1.23
|
Behavior instance. More...
Public Member Functions | |
void | dispose () |
Dispose of composeable instance. More... | |
void | forEachHit (Block ablock) |
Visit collision tests with found collisions. More... | |
void | forEachTest (Block ablock) |
Visit collision tests using block. More... | |
String | getBone () |
Test bone. More... | |
ECBehaviorCollider.Instance | getCollider () |
Collider behavior. More... | |
ECBehaviorComponent.Instance | getComponent () |
Collider behavior or null if not used. More... | |
Vector | getDirection () |
Normalized test direction. More... | |
ECBehaviorHitScan | getECBehavior () |
Behavior. More... | |
float | getOffset () |
Test origin offset. More... | |
Quaternion | getOrientation () |
Test orientation. More... | |
Vector | getOrigin () |
Test origin. More... | |
float | getRange () |
Test range. More... | |
ColliderCollisionTest | getTestAt (int index) |
Collision test at index. More... | |
int | getTestCount () |
Count of collision tests. More... | |
Matrix | getViewMatrix () |
View matrix. More... | |
void | init (StubElement stub) |
Initialize element from stub. More... | |
bool | isRunning () |
Hit scan is running. More... | |
Instance | new (ECBehaviorHitScan ecbehavior, BehaviorElement element) |
Create element. More... | |
void | setBone (String bone) |
Set test bone. More... | |
void | setCollisionFilter (CollisionFilter collisionFilter) |
Set collision filter. More... | |
void | setDirection (Vector direction) |
Set normalized test direction. More... | |
void | setOffset (float offset) |
Set test origin offset. More... | |
void | setOrientation (Quaternion orientation) |
Set test orientation. More... | |
void | setOrigin (Vector origin) |
Set test origin. More... | |
void | setRange (float range) |
Set test range. More... | |
void | start (int count) |
Start collision tests. More... | |
void | startCone (int count, float angle) |
Start collision tests arranging them randomly in a small cone cap. More... | |
void | stop () |
Stop hit scans. 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 | 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... | |
Public Attributes | |
String | pBone |
ECBehaviorCollider.Instance | pCollider |
CollisionFilter | pCollisionFilter |
ECBehaviorComponent.Instance | pComponent |
Vector | pDirection |
ECBehaviorHitScan | pECBehavior |
float | pOffset |
float | pOffsetByRange |
Quaternion | pOrientation |
Vector | pOrigin |
float | pRange |
Array | pTests |
Matrix | pViewMatrix |
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... | |
Behavior instance.
void Dragengine.Scenery.ECBehaviorHitScan.Instance.dispose | ( | ) |
Dispose of composeable instance.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
void Dragengine.Scenery.ECBehaviorHitScan.Instance.forEachHit | ( | Block | ablock | ) |
Visit collision tests with found collisions.
Block receives ColliderCollisionTest as argument.
void Dragengine.Scenery.ECBehaviorHitScan.Instance.forEachTest | ( | Block | ablock | ) |
Visit collision tests using block.
Block receives ColliderCollisionTest as argument.
String Dragengine.Scenery.ECBehaviorHitScan.Instance.getBone | ( | ) |
Test bone.
ECBehaviorCollider.Instance Dragengine.Scenery.ECBehaviorHitScan.Instance.getCollider | ( | ) |
Collider behavior.
ECBehaviorComponent.Instance Dragengine.Scenery.ECBehaviorHitScan.Instance.getComponent | ( | ) |
Collider behavior or null if not used.
Vector Dragengine.Scenery.ECBehaviorHitScan.Instance.getDirection | ( | ) |
Normalized test direction.
ECBehaviorHitScan Dragengine.Scenery.ECBehaviorHitScan.Instance.getECBehavior | ( | ) |
Behavior.
float Dragengine.Scenery.ECBehaviorHitScan.Instance.getOffset | ( | ) |
Test origin offset.
Quaternion Dragengine.Scenery.ECBehaviorHitScan.Instance.getOrientation | ( | ) |
Test orientation.
Vector Dragengine.Scenery.ECBehaviorHitScan.Instance.getOrigin | ( | ) |
Test origin.
float Dragengine.Scenery.ECBehaviorHitScan.Instance.getRange | ( | ) |
Test range.
ColliderCollisionTest Dragengine.Scenery.ECBehaviorHitScan.Instance.getTestAt | ( | int | index | ) |
Collision test at index.
int Dragengine.Scenery.ECBehaviorHitScan.Instance.getTestCount | ( | ) |
Count of collision tests.
Matrix Dragengine.Scenery.ECBehaviorHitScan.Instance.getViewMatrix | ( | ) |
View matrix.
1.22
Same as Matrix.newFromQuaternion(Quaternion) called with getOrientation() as parameter.
This matrix is useful if you want to manually set the test direction of individual tests after starting hit scanning. The Z-Axis of the matrix points into the direction of the zero vector similar to #resetTestDirections().
void Dragengine.Scenery.ECBehaviorHitScan.Instance.init | ( | StubElement | stub | ) |
Initialize element from stub.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
bool Dragengine.Scenery.ECBehaviorHitScan.Instance.isRunning | ( | ) |
Hit scan is running.
Instance Dragengine.Scenery.ECBehaviorHitScan.Instance.new | ( | ECBehaviorHitScan | ecbehavior, |
BehaviorElement | element | ||
) |
Create element.
void Dragengine.Scenery.ECBehaviorHitScan.Instance.setBone | ( | String | bone | ) |
Set test bone.
void Dragengine.Scenery.ECBehaviorHitScan.Instance.setCollisionFilter | ( | CollisionFilter | collisionFilter | ) |
Set collision filter.
void Dragengine.Scenery.ECBehaviorHitScan.Instance.setDirection | ( | Vector | direction | ) |
Set normalized test direction.
void Dragengine.Scenery.ECBehaviorHitScan.Instance.setOffset | ( | float | offset | ) |
Set test origin offset.
void Dragengine.Scenery.ECBehaviorHitScan.Instance.setOrientation | ( | Quaternion | orientation | ) |
Set test orientation.
void Dragengine.Scenery.ECBehaviorHitScan.Instance.setOrigin | ( | Vector | origin | ) |
Set test origin.
void Dragengine.Scenery.ECBehaviorHitScan.Instance.setRange | ( | float | range | ) |
Set test range.
void Dragengine.Scenery.ECBehaviorHitScan.Instance.start | ( | int | count | ) |
Start collision tests.
After call returns the given number of collision tests are attached to the collider and ready to run using the last configuration used.
void Dragengine.Scenery.ECBehaviorHitScan.Instance.startCone | ( | int | count, |
float | angle | ||
) |
Start collision tests arranging them randomly in a small cone cap.
After call returns the given number of collision tests are attached to the collider and ready to run using the last configuration used.
This method can be used for weapons with multiple projectiles like buck shots.
angle | Opening angle in degrees (angle across diameter). |
void Dragengine.Scenery.ECBehaviorHitScan.Instance.stop | ( | ) |
Stop hit scans.
String Dragengine.Scenery.ECBehaviorHitScan.Instance.pBone |
ECBehaviorCollider.Instance Dragengine.Scenery.ECBehaviorHitScan.Instance.pCollider |
CollisionFilter Dragengine.Scenery.ECBehaviorHitScan.Instance.pCollisionFilter |
ECBehaviorComponent.Instance Dragengine.Scenery.ECBehaviorHitScan.Instance.pComponent |
Vector Dragengine.Scenery.ECBehaviorHitScan.Instance.pDirection |
ECBehaviorHitScan Dragengine.Scenery.ECBehaviorHitScan.Instance.pECBehavior |
float Dragengine.Scenery.ECBehaviorHitScan.Instance.pOffset |
float Dragengine.Scenery.ECBehaviorHitScan.Instance.pOffsetByRange |
Quaternion Dragengine.Scenery.ECBehaviorHitScan.Instance.pOrientation |
Vector Dragengine.Scenery.ECBehaviorHitScan.Instance.pOrigin |
float Dragengine.Scenery.ECBehaviorHitScan.Instance.pRange |
Array Dragengine.Scenery.ECBehaviorHitScan.Instance.pTests |
Matrix Dragengine.Scenery.ECBehaviorHitScan.Instance.pViewMatrix |