|
Drag[en]gine Script Module DragonScript 1.32.1
|
Behavior element behavior adding animation support to ECBehaviorLight. More...
Classes | |
| class | ECCLightParameter |
| Composable Light parameter properties. More... | |
| class | Factory |
| Behavior factory. More... | |
| class | Instance |
| Behavior instance. More... | |
| enum | LightParameter |
| Light parameter. More... | |
Public Member Functions | |
| void | dispose () |
| Dispose of behavior. | |
| ECPAnimation | getAnimation () |
| Animation. | |
| ECComposeBTSM | getBTSMs () |
| Compose behavior trees and state machines. | |
| ECBehaviorComponent | getComponent () |
| Component behavior or null. | |
| ECPBoolean | getEnabled () |
| Animation is enabled. | |
| ECBehaviorLight | getLight () |
| Light behavior to modify. | |
| ECCLightParameter | getLightParameter (LightParameter parameter) |
| Light parameter element class properties. | |
| ECPString | getMove () |
| Animation move name. | |
| ECPFloat | getPlaySpeed () |
| Play speed. | |
| String | getPrefix () |
| Prefix. | |
| ECBehaviorTriggered | getTrigger () |
| Trigger enable. | |
| TSTriggerTable | getTriggerTable () |
| Trigger table or null if not used. | |
| Instance | instance (BehaviorElement element) |
| Get instance in element from owner element class. | |
| ECBehaviorLightAnimation | new (BehaviorElementClass eclass, ECBehaviorLight light, ECBehaviorComponent component) |
| Create behavior element class. | |
| ECBehaviorLightAnimation | new (BehaviorElementClass eclass, ECBehaviorLight light, ECBehaviorComponent component, String id) |
| ECBehaviorLightAnimation | new (BehaviorElementClass eclass, ECBehaviorLight light, ECBehaviorComponent component, TSTriggerTable triggerTable) |
| ECBehaviorLightAnimation | new (BehaviorElementClass eclass, ECBehaviorLight light, ECBehaviorComponent component, TSTriggerTable triggerTable, String id) |
| ECBehaviorLightAnimation | new (BehaviorElementClass eclass, ECBehaviorLight light, ECBehaviorComponent component, TSTriggerTable triggerTable, String id, String subID) |
| ECBehaviorLightAnimation | new (BehaviorElementClass eclass, ECBehaviorLight light, ECBehaviorComponent component, TSTriggerTable triggerTable, String id, String subID, String prefix) |
| void | setComponent (ECBehaviorComponent component) |
| Set component behavior or null. | |
| void | setLight (ECBehaviorLight light) |
| Set light behavior to modify. | |
| void | setTriggerTable (TSTriggerTable triggerTable) |
| Set trigger table or null if not used. | |
Public Member Functions inherited from Dragengine.Scenery.DefaultECBehavior | |
| void | assignInstanceIndex (int instanceIndex) |
| Assign instance index. | |
| String | getBehaviorID () |
| Unique identifier of behavior. | |
| String | getID () |
| Identifier. | |
| int | getInstanceIndex () |
| Instance index. | |
| void | loadSupportedData (String identifier, PersistencyEnvironment env, FileReader reader, ECBehaviorInstance instance) |
| Load instance data of another behavior. | |
| bool | supportsBehaviorID (String identifier) |
| Behavior supports loading instance data of another behavior. | |
Public Member Functions inherited from Dragengine.Scenery.ECBehavior | |
| ECBehaviorInstance | createInstance (BehaviorElement element) |
| Create Behavior instance. | |
Static Public Member Functions | |
| static ECBehaviorLightAnimation | getBehaviorIn (BehaviorElementClass eclass) |
| First ECBehaviorLightAnimation or null if absent. | |
Public Attributes | |
| ECPAnimation | pAnimation |
| ECComposeBTSM | pBTSMs |
| ECBehaviorComponent | pComponent |
| ECPBoolean | pEnabled |
| ECBehaviorLight | pLight |
| Dictionary | pLightParameters |
| ECPString | pMove |
| ECPFloat | pPlaySpeed |
| String | pPrefix |
| ECBehaviorTriggered | pTrigger |
| TSTriggerTable | pTriggerTable |
Additional Inherited Members | |
Protected Member Functions inherited from Dragengine.Scenery.DefaultECBehavior | |
| DefaultECBehavior | new (BehaviorElementClass eclass) |
| Create default composeable behavior with empty identifier. | |
| DefaultECBehavior | new (BehaviorElementClass eclass, String id) |
| Create default composeable behavior. | |
| void | setBehaviorID (String identifier) |
| Set behavior identifier. | |
| void | useClassNameAsBehaviorID () |
| Set behavior identifier to "<class-name>:<identifier>". | |
| void | useFullyQualifiedClassNameAsBehaviorID () |
| Set behavior identifier to "<fully-qualified-class-name>:<identifier>". | |
Behavior element behavior adding animation support to ECBehaviorLight.
This behavior modifies the light parameters of ECBehaviorLight instances present in the element using move keyframes stored in an Animation or ECBehaviorComponent state. Animation playback starts when the light becomes activated and stops (and resets) if reactivated.
To use this behavior add first an ECBehaviorLight. Adding ECBehaviorLightAnimation will then register itself as listener to the ECBehaviorLight and also set it to use custom light handling.
Multiple ECBehaviorLightAnimation instances can be added to affect individual ECBehaviorLight instances like this example below.
Using Animation keyframes from a move is used to animate the light parameters.
Using ECBehaviorComponent the animated state is used to animate the light parameters. In this case the play time is 0 since the component state is typically driven by an animator or manually.
The input values obtained either from animation keyframes or component state is remapped before applying to the light parameter. This linearly maps the lower remap value (default 0) to 0 output value and the upper remap value (default 1) to 1 output value. Values outside the remap range are extrapolated.
Remapping is applied before scaling.
Element class properties have the prefix "lightAnimation{(id)}.".
This behaviors scales intensity, range and spot angle. During init() call intensity, range and spot angle of light are stored as scale values. These values can be later on changed if required. Using this system the input intensity, range and spot angle values can be kept in the range from 0 to 1 similar to the other parameters. The final values are then obtained by scaling by the scale factor.
Hence intensity, range and spot angle are animated as relative values while all other light parameters are animated absolute.
This behavior supports persistable element class (setPersistable).
| void Dragengine.Scenery.ECBehaviorLightAnimation.dispose | ( | ) |
Dispose of behavior.
Reimplemented from Dragengine.Scenery.DefaultECBehavior.
| ECPAnimation Dragengine.Scenery.ECBehaviorLightAnimation.getAnimation | ( | ) |
Animation.
|
static |
First ECBehaviorLightAnimation or null if absent.
| ECComposeBTSM Dragengine.Scenery.ECBehaviorLightAnimation.getBTSMs | ( | ) |
Compose behavior trees and state machines.
| ECBehaviorComponent Dragengine.Scenery.ECBehaviorLightAnimation.getComponent | ( | ) |
Component behavior or null.
| ECPBoolean Dragengine.Scenery.ECBehaviorLightAnimation.getEnabled | ( | ) |
Animation is enabled.
| ECBehaviorLight Dragengine.Scenery.ECBehaviorLightAnimation.getLight | ( | ) |
Light behavior to modify.
| ECCLightParameter Dragengine.Scenery.ECBehaviorLightAnimation.getLightParameter | ( | LightParameter | parameter | ) |
Light parameter element class properties.
| ECPString Dragengine.Scenery.ECBehaviorLightAnimation.getMove | ( | ) |
Animation move name.
| ECPFloat Dragengine.Scenery.ECBehaviorLightAnimation.getPlaySpeed | ( | ) |
Play speed.
| String Dragengine.Scenery.ECBehaviorLightAnimation.getPrefix | ( | ) |
Prefix.
| ECBehaviorTriggered Dragengine.Scenery.ECBehaviorLightAnimation.getTrigger | ( | ) |
Trigger enable.
| TSTriggerTable Dragengine.Scenery.ECBehaviorLightAnimation.getTriggerTable | ( | ) |
Trigger table or null if not used.
| Instance Dragengine.Scenery.ECBehaviorLightAnimation.instance | ( | BehaviorElement | element | ) |
Get instance in element from owner element class.
| ECBehaviorLightAnimation Dragengine.Scenery.ECBehaviorLightAnimation.new | ( | BehaviorElementClass | eclass, |
| ECBehaviorLight | light, | ||
| ECBehaviorComponent | component | ||
| ) |
Create behavior element class.
Component and trigger table are optional.
| ECBehaviorLightAnimation Dragengine.Scenery.ECBehaviorLightAnimation.new | ( | BehaviorElementClass | eclass, |
| ECBehaviorLight | light, | ||
| ECBehaviorComponent | component, | ||
| String | id | ||
| ) |
| ECBehaviorLightAnimation Dragengine.Scenery.ECBehaviorLightAnimation.new | ( | BehaviorElementClass | eclass, |
| ECBehaviorLight | light, | ||
| ECBehaviorComponent | component, | ||
| TSTriggerTable | triggerTable | ||
| ) |
| ECBehaviorLightAnimation Dragengine.Scenery.ECBehaviorLightAnimation.new | ( | BehaviorElementClass | eclass, |
| ECBehaviorLight | light, | ||
| ECBehaviorComponent | component, | ||
| TSTriggerTable | triggerTable, | ||
| String | id | ||
| ) |
| ECBehaviorLightAnimation Dragengine.Scenery.ECBehaviorLightAnimation.new | ( | BehaviorElementClass | eclass, |
| ECBehaviorLight | light, | ||
| ECBehaviorComponent | component, | ||
| TSTriggerTable | triggerTable, | ||
| String | id, | ||
| String | subID | ||
| ) |
| ECBehaviorLightAnimation Dragengine.Scenery.ECBehaviorLightAnimation.new | ( | BehaviorElementClass | eclass, |
| ECBehaviorLight | light, | ||
| ECBehaviorComponent | component, | ||
| TSTriggerTable | triggerTable, | ||
| String | id, | ||
| String | subID, | ||
| String | prefix | ||
| ) |
| void Dragengine.Scenery.ECBehaviorLightAnimation.setComponent | ( | ECBehaviorComponent | component | ) |
Set component behavior or null.
| void Dragengine.Scenery.ECBehaviorLightAnimation.setLight | ( | ECBehaviorLight | light | ) |
Set light behavior to modify.
| void Dragengine.Scenery.ECBehaviorLightAnimation.setTriggerTable | ( | TSTriggerTable | triggerTable | ) |
Set trigger table or null if not used.
| ECPAnimation Dragengine.Scenery.ECBehaviorLightAnimation.pAnimation |
| ECComposeBTSM Dragengine.Scenery.ECBehaviorLightAnimation.pBTSMs |
| ECBehaviorComponent Dragengine.Scenery.ECBehaviorLightAnimation.pComponent |
| ECPBoolean Dragengine.Scenery.ECBehaviorLightAnimation.pEnabled |
| ECBehaviorLight Dragengine.Scenery.ECBehaviorLightAnimation.pLight |
| Dictionary Dragengine.Scenery.ECBehaviorLightAnimation.pLightParameters |
| ECPString Dragengine.Scenery.ECBehaviorLightAnimation.pMove |
| ECPFloat Dragengine.Scenery.ECBehaviorLightAnimation.pPlaySpeed |
| String Dragengine.Scenery.ECBehaviorLightAnimation.pPrefix |
| ECBehaviorTriggered Dragengine.Scenery.ECBehaviorLightAnimation.pTrigger |
| TSTriggerTable Dragengine.Scenery.ECBehaviorLightAnimation.pTriggerTable |