|
Drag[en]gine Script Module DragonScript 1.35
|
Behavior instance. More...
Public Member Functions | |
| void | dispose () |
| Dispose of composeable instance. | |
| Vector | getDirection () |
| Test direction. | |
| ECBehaviorBodyTilting | getECBehavior () |
| Behavior. | |
| bool | getEnabled () |
| Enable body tilting. | |
| ColliderCollisionTest | geTestBackRight () |
| Tilt back right collision test. | |
| ECBehaviorLocomotion.Instance | getLocomotion () |
| Locomotion behavior. | |
| ECBehaviorProjectToGround.Instance | getProjectToGround () |
| Project to ground behavior. | |
| ColliderCollisionTest | getTestBackLeft () |
| Tilt back left collision test. | |
| ColliderVolume | getTestCollider () |
| Collier to attach collision tests to. | |
| ColliderCollisionTest | getTestFrontLeft () |
| Tilt front left collision test. | |
| ColliderCollisionTest | getTestFrontRight () |
| Tilt front right collision test. | |
| void | init (StubElement stub) |
| Initialize element from stub. | |
| Instance | new (ECBehaviorBodyTilting ecbehavior, BehaviorElement element) |
| Create element. | |
| void | setCollisionFilter (CollisionFilter filter) |
| Set test collision filter. | |
| void | setDirection (float distance) |
| Set test direction. | |
| void | setDirection (Vector distance) |
| Set test direction. | |
| void | setEnabled (bool enabled) |
| Set if body tilting is enabled. | |
| void | setOrigin (float right, float front, float up) |
| Set test origins. | |
| void | setOrigin (Vector frontLeft, Vector frontRight, Vector backLeft, Vector backRight) |
| Set test origins. | |
| void | setShape (ShapeList shape) |
| Set shape of test collider. | |
| Public Member Functions inherited from Dragengine.Scenery.DefaultECBehaviorInstance | |
| void | addToGameWorld () |
| Add element to game world. | |
| void | attachToParent (Element parent) |
| Attach element to object set by the mapper in the IGDE World Editor. | |
| void | enterFrame () |
| Frame update started. | |
| void | geometryChanged () |
| Position or orientation changed. | |
| BehaviorElement | getElement () |
| Behavior element to apply behavior to. | |
| int | getInstanceIndex () |
| Behavior instance index. | |
| DefaultECBehaviorInstance | new (BehaviorElement element) |
| Create default composeable instance. | |
| void | postThink (float elapsed) |
| Post thinking after physics processing is finished. | |
| void | readFromFile (PersistencyEnvironment env, FileReader reader) |
| Read behavior instance from file. | |
| void | removeFromGameWorld () |
| Remove element from game world. | |
| bool | requiresEnterFrame () |
| Behavior instance requires enterFrame() to be called. | |
| bool | requiresThink () |
| Behavior instance requires think() to be called. | |
| void | stateChanged () |
| State changed (visble, touchable). | |
| void | think (float elapsed) |
| Think about what to do for the next frame update. | |
| void | writeToFile (PersistencyEnvironment env, FileWriter writer) |
| Write behavior instance to file. | |
Additional Inherited Members | |
| Public Attributes inherited from Dragengine.Scenery.DefaultECBehaviorInstance | |
| BehaviorElement | pElement |
| int | pInstanceIndex |
| bool | pRequiresEnterFrame |
| bool | pRequiresThink |
| Protected Member Functions inherited from Dragengine.Scenery.DefaultECBehaviorInstance | |
| void | setRequiresEnterFrame (bool required) |
| Set if behavior instance requires enterFrame() to be called. | |
| void | setRequiresThink (bool required) |
| Set if behavior instance requires think() to be called. | |
Behavior instance.
| void Dragengine.Scenery.ECBehaviorBodyTilting.Instance.dispose | ( | ) |
Dispose of composeable instance.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
Referenced by getEnabled(), and getLocomotion().
| Vector Dragengine.Scenery.ECBehaviorBodyTilting.Instance.getDirection | ( | ) |
Test direction.
References new().
| ECBehaviorBodyTilting Dragengine.Scenery.ECBehaviorBodyTilting.Instance.getECBehavior | ( | ) |
Behavior.
References getLocomotion(), getProjectToGround(), and Dragengine.Scenery.ECBehaviorBodyTilting.instance().
Referenced by setOrigin().
| bool Dragengine.Scenery.ECBehaviorBodyTilting.Instance.getEnabled | ( | ) |
| ColliderCollisionTest Dragengine.Scenery.ECBehaviorBodyTilting.Instance.geTestBackRight | ( | ) |
Tilt back right collision test.
References setEnabled().
| ECBehaviorLocomotion.Instance Dragengine.Scenery.ECBehaviorBodyTilting.Instance.getLocomotion | ( | ) |
Locomotion behavior.
References dispose().
Referenced by getECBehavior(), setEnabled(), setOrigin(), and setShape().
| ECBehaviorProjectToGround.Instance Dragengine.Scenery.ECBehaviorBodyTilting.Instance.getProjectToGround | ( | ) |
Project to ground behavior.
Referenced by getECBehavior(), and setOrigin().
| ColliderCollisionTest Dragengine.Scenery.ECBehaviorBodyTilting.Instance.getTestBackLeft | ( | ) |
Tilt back left collision test.
References setEnabled().
| ColliderVolume Dragengine.Scenery.ECBehaviorBodyTilting.Instance.getTestCollider | ( | ) |
Collier to attach collision tests to.
| ColliderCollisionTest Dragengine.Scenery.ECBehaviorBodyTilting.Instance.getTestFrontLeft | ( | ) |
Tilt front left collision test.
References getEnabled().
| ColliderCollisionTest Dragengine.Scenery.ECBehaviorBodyTilting.Instance.getTestFrontRight | ( | ) |
Tilt front right collision test.
References setEnabled().
| void Dragengine.Scenery.ECBehaviorBodyTilting.Instance.init | ( | StubElement | stub | ) |
Initialize element from stub.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
References new().
Referenced by setEnabled().
| Instance Dragengine.Scenery.ECBehaviorBodyTilting.Instance.new | ( | ECBehaviorBodyTilting | ecbehavior, |
| BehaviorElement | element ) |
Create element.
Referenced by getDirection(), init(), setCollisionFilter(), setDirection(), setDirection(), and setEnabled().
| void Dragengine.Scenery.ECBehaviorBodyTilting.Instance.setCollisionFilter | ( | CollisionFilter | filter | ) |
Set test collision filter.
References Dragengine.Scenery.ECBehaviorBodyTilting.getTestOrigin(), and new().
| void Dragengine.Scenery.ECBehaviorBodyTilting.Instance.setDirection | ( | float | distance | ) |
Set test direction.
| distance | Distance to test along. This is the furthest distance the actor can be projected down to. Typical value is -0.3 to project the actor down by at most 0.3 meters. |
References new().
| void Dragengine.Scenery.ECBehaviorBodyTilting.Instance.setDirection | ( | Vector | distance | ) |
Set test direction.
| distance | Distance to test along. This is the furthest distance the actor can be projected down to. Typical value is (0, -0.3, 0) to project the actor down by at most 0.3 meters. |
References new().
| void Dragengine.Scenery.ECBehaviorBodyTilting.Instance.setEnabled | ( | bool | enabled | ) |
Set if body tilting is enabled.
References getLocomotion(), init(), and new().
Referenced by geTestBackRight(), getTestBackLeft(), and getTestFrontRight().
| void Dragengine.Scenery.ECBehaviorBodyTilting.Instance.setOrigin | ( | float | right, |
| float | front, | ||
| float | up ) |
Set test origins.
Tests are distributed front-left, front-right, back-left and back-right.
| right | Offset to the left and right. Typical value is 0.2m |
| front | Offset to the front and back. Typical value is 0.2m |
| up | Offset upwards. Typical value is 0.2. |
References getECBehavior(), and getLocomotion().
| void Dragengine.Scenery.ECBehaviorBodyTilting.Instance.setOrigin | ( | Vector | frontLeft, |
| Vector | frontRight, | ||
| Vector | backLeft, | ||
| Vector | backRight ) |
Set test origins.
Tests are distributed front-left, front-right, back-left and back-right.
| frontLeft | Offset for the front-left test. |
| frontRight | Offset for the front-right test. |
| backLeft | Offeset for the back-left test. |
| backRight | Offeset for the back-right test. |
References getProjectToGround().
| void Dragengine.Scenery.ECBehaviorBodyTilting.Instance.setShape | ( | ShapeList | shape | ) |
Set shape of test collider.
For best results a shape should be used which is slightly smaller than the shape of the collider used to move an element through the game world. If the shape used for the test collider is equal or larger strange behavior can be the result (for example climbing).
Recommended is setting a ShapeList with a box at (0, 0.05, 0), no orientation and half-extends (0.05, 0.05, 0.05).
References Dragengine.Scenery.DefaultECBehaviorInstance.getElement(), and getLocomotion().