Drag[en]gine Script Module DragonScript
1.21
|
Default implementation of ECBehavior. More...
Public Member Functions | |
void | assignInstanceIndex (int instanceIndex) |
Assign instance index. More... | |
void | dispose () |
Dispose of behavior. More... | |
String | getBehaviorID () |
Unique identifier of behavior. More... | |
String | getID () |
Identifier. More... | |
int | getInstanceIndex () |
Instance index. More... | |
void | loadSupportedData (String identifier, PersistencyEnvironment env, FileReader reader, ECBehaviorInstance instance) |
Load instance data of another behavior. More... | |
bool | supportsBehaviorID (String identifier) |
Behavior supports loading instance data of another behavior. More... | |
Public Member Functions inherited from Dragengine.Scenery.ECBehavior | |
ECBehaviorInstance | createInstance (BehaviorElement element) |
Create Behavior instance. More... | |
Protected Member Functions | |
DefaultECBehavior | new (BehaviorElementClass eclass) |
Create default composeable behavior with empty identifier. More... | |
DefaultECBehavior | new (BehaviorElementClass eclass, String id) |
Create default composeable behavior. More... | |
void | setBehaviorID (String identifier) |
Set behavior identifier. More... | |
void | useClassNameAsBehaviorID () |
Set behavior identifier to "<class-name>:<identifier>". More... | |
void | useFullyQualifiedClassNameAsBehaviorID () |
Set behavior identifier to "<fully-qualified-class-name>:<identifier>". More... | |
Default implementation of ECBehavior.
Stores identifier for behaviors supporting multi-use (empty string for single-use). Stores also the instance index. This allows to quickly obtain the instance for behavior element instances matching the element class this behavior is located in. This is typically used in behavior element constructors to store the instances for directly accessed behaviors without finding them.
void Dragengine.Scenery.DefaultECBehavior.assignInstanceIndex | ( | int | instanceIndex | ) |
Assign instance index.
Implements Dragengine.Scenery.ECBehavior.
void Dragengine.Scenery.DefaultECBehavior.dispose | ( | ) |
Dispose of behavior.
Implements Dragengine.Scenery.ECBehavior.
Reimplemented in Dragengine.Scenery.ECBehaviorMoveOnRail, Dragengine.Scenery.ECBehaviorVRHMD, Dragengine.Scenery.ECBehaviorVRHandPose, Dragengine.Scenery.ECBehaviorVRHandPointAt, Dragengine.Scenery.ECBehaviorVRHandLaserPointer, Dragengine.Scenery.ECBehaviorVRHandAction, Dragengine.Scenery.ECBehaviorVRControlDesktop, Dragengine.Scenery.ECBehaviorTriggered, Dragengine.Scenery.ECBehaviorTouching, Dragengine.Scenery.ECBehaviorToggle, Dragengine.Scenery.ECBehaviorTimer, Dragengine.Scenery.ECBehaviorEvaluate, Dragengine.Scenery.ECBehaviorSpeaker, Dragengine.Scenery.ECBehaviorPlaySound, Dragengine.Scenery.ECBehaviorAnnouncer, Dragengine.Scenery.ECBehaviorPlayerInputTurn, Dragengine.Scenery.ECBehaviorPlayerInputMove, Dragengine.Scenery.ECBehaviorPlayerInputLook, Dragengine.Scenery.ECBehaviorPlayerInputCrouch, Dragengine.Scenery.ECBehaviorPlayerControllable, Dragengine.Scenery.ECBehaviorNetworkState, Dragengine.Scenery.ECBehaviorStashable, Dragengine.Scenery.ECBehaviorInventory, Dragengine.Scenery.ECBehaviorVRHandPointedAt, Dragengine.Scenery.ECBehaviorOccupier, Dragengine.Scenery.ECBehaviorLookedAt, Dragengine.Scenery.ECBehaviorInteractionSpot, Dragengine.Scenery.ECBehaviorGrabSpot, Dragengine.Scenery.ECBehaviorControlDesktop, Dragengine.Scenery.ECBehaviorSkinSwitcher, Dragengine.Scenery.ECBehaviorOutline, Dragengine.Scenery.ECBehaviorStateMachine, Dragengine.Scenery.ECBehaviorRidable, Dragengine.Scenery.ECBehaviorParticleEmitter, Dragengine.Scenery.ECBehaviorNavigationSpace, Dragengine.Scenery.ECBehaviorNavigationBlocker, Dragengine.Scenery.ECBehaviorLightDimmer, Dragengine.Scenery.ECBehaviorLight, Dragengine.Scenery.ECBehaviorHitScan, Dragengine.Scenery.ECBehaviorForceField, Dragengine.Scenery.ECBehaviorEnvMapProbe, Dragengine.Scenery.ECBehaviorDecal, Dragengine.Scenery.ECBehaviorCustomColor, Dragengine.Scenery.ECBehaviorComponent, Dragengine.Scenery.ECBehaviorCollider, Dragengine.Scenery.ECBehaviorCamera, Dragengine.Scenery.ECBehaviorBillboard, Dragengine.Scenery.ECBehaviorRenderablePanel, Dragengine.Scenery.ECBehaviorRenderableLight, Dragengine.Scenery.ECBehaviorRenderableDesktop, Dragengine.Scenery.ECBehaviorRenderableCustomColor, Dragengine.Scenery.ECBehaviorRenderableCanvasBase, Dragengine.Scenery.ECBehaviorRenderableCanvas, Dragengine.Scenery.ECBehaviorRenderableCamera, Dragengine.Scenery.ECBehaviorDynamicSkin, Dragengine.Scenery.ECBehaviorAttachDynamicSkin, Dragengine.Scenery.ECBehaviorConversation, Dragengine.Scenery.ECBCTRRBindings, Dragengine.Scenery.ECBehaviorAttachToParent, Dragengine.Scenery.ECBehaviorAttachSlot, Dragengine.Scenery.ECBehaviorAttachable, Dragengine.Scenery.ECBehaviorStepAside, Dragengine.Scenery.ECBehaviorRideOn, Dragengine.Scenery.ECBehaviorProjectToGround, Dragengine.Scenery.ECBehaviorLocomotion, Dragengine.Scenery.ECBehaviorColliderAI, Dragengine.Scenery.ECBehaviorClearPath, Dragengine.Scenery.ECBehaviorBodyTilting, Dragengine.Scenery.ECBehaviorBehaviorTree, Dragengine.Scenery.ECBehaviorAvoidCollision, Dragengine.Scenery.ECBehaviorAlignActor, Dragengine.Scenery.ECBehaviorActorMoverUnstuck, Dragengine.Scenery.ECBehaviorActorMover, Dragengine.Scenery.ECBehaviorActorIK, Dragengine.Scenery.ECBehaviorActorAnimated, Dragengine.Scenery.ECBehaviorActorAIAction, Dragengine.Gui.MainMenus.Interactive.IMMBehaviorHotSpot, and Dragengine.Gui.MainMenus.Interactive.IMMBehaviorColliderInteract.
String Dragengine.Scenery.DefaultECBehavior.getBehaviorID | ( | ) |
Unique identifier of behavior.
Has to return a string which is unique in the owner BehaviorElementClass. This string will be stored while persisting BehaviorElement instances. This allows to assign restored behavior instance data to the corrent behavior instance if present.
The default implementation returns "<class-name>:<identifier>" or "<class-name>" if identifier is empty string (constructor calls useClassNameAsBehaviorID()). If two or more behaviors share the same class name you have to make sure getBehaviorID() returns unique names. This can be done using one of these possible ways:
Implements Dragengine.Scenery.BehaviorCompatiblePersistency.
String Dragengine.Scenery.DefaultECBehavior.getID | ( | ) |
Identifier.
int Dragengine.Scenery.DefaultECBehavior.getInstanceIndex | ( | ) |
Instance index.
Implements Dragengine.Scenery.ECBehavior.
void Dragengine.Scenery.DefaultECBehavior.loadSupportedData | ( | String | identifier, |
PersistencyEnvironment | env, | ||
FileReader | reader, | ||
ECBehaviorInstance | instance | ||
) |
Load instance data of another behavior.
Called if supportsBehaviorID(String) returns true for identifier. BehaviorElement requests behavior to load the supported instance data block into instance.
Default implementation throws EInvalidAction exception.
Implements Dragengine.Scenery.BehaviorCompatiblePersistency.
|
protected |
Create default composeable behavior with empty identifier.
Reimplemented in Dragengine.Scenery.ECBehaviorTriggered, Dragengine.Scenery.ECBehaviorToggle, Dragengine.Scenery.ECBehaviorTimer, Dragengine.Scenery.ECBehaviorEvaluate, Dragengine.Scenery.ECBehaviorSky, Dragengine.Scenery.ECBehaviorPlayerControllable, Dragengine.Scenery.ECBehaviorStashable, Dragengine.Scenery.ECBehaviorInventory, Dragengine.Scenery.ECBehaviorVRHandPointedAt, Dragengine.Scenery.ECBehaviorOccupier, Dragengine.Scenery.ECBehaviorLookedAt, Dragengine.Scenery.ECBehaviorInteractPrompt, Dragengine.Scenery.ECBehaviorInteractionSpot, Dragengine.Scenery.ECBehaviorStateMachine, Dragengine.Scenery.ECBehaviorShowMessage, Dragengine.Scenery.ECBehaviorShowElement, Dragengine.Scenery.ECBehaviorCustomColor, Dragengine.Scenery.ECBehaviorConvoCoordSystem, Dragengine.Scenery.ECBehaviorComposed, Dragengine.Scenery.ECBehaviorAvoidedByActor, Dragengine.Scenery.ECBehaviorAnchorElement, Dragengine.Scenery.ECBehaviorConversation, Dragengine.Scenery.ECBehaviorParameterTable, Dragengine.Scenery.ECBehaviorNavigator, Dragengine.Scenery.ECBehaviorFootSteps, and Dragengine.Scenery.ECBehaviorBehaviorTree.
|
protected |
Create default composeable behavior.
Reimplemented in Dragengine.Scenery.ECBehaviorAnchorElement, Dragengine.Scenery.ECBehaviorSky, Dragengine.Scenery.ECBehaviorStashable, Dragengine.Scenery.ECBehaviorParameterTable, Dragengine.Scenery.ECBehaviorFootSteps, Dragengine.Scenery.ECBehaviorTriggered, Dragengine.Scenery.ECBehaviorToggle, Dragengine.Scenery.ECBehaviorTimer, Dragengine.Scenery.ECBehaviorEvaluate, Dragengine.Scenery.ECBehaviorInventory, Dragengine.Scenery.ECBehaviorOccupier, Dragengine.Scenery.ECBehaviorInteractPrompt, Dragengine.Scenery.ECBehaviorInteractionSpot, Dragengine.Scenery.ECBehaviorStateMachine, Dragengine.Scenery.ECBehaviorShowMessage, Dragengine.Scenery.ECBehaviorCustomColor, Dragengine.Scenery.ECBehaviorConvoCoordSystem, Dragengine.Scenery.ECBehaviorComposed, Dragengine.Scenery.ECBehaviorAvoidedByActor, Dragengine.Scenery.ECBehaviorConversation, Dragengine.Scenery.ECBehaviorNavigator, and Dragengine.Scenery.ECBehaviorBehaviorTree.
|
protected |
Set behavior identifier.
bool Dragengine.Scenery.DefaultECBehavior.supportsBehaviorID | ( | String | identifier | ) |
Behavior supports loading instance data of another behavior.
Returns true if thie behavior supports loading instance data of another behavior matching behavior identifier. Called for all behaviors if BehaviorElement encountered an instance data block with a behavior identifier not matching any behavior instances.
Default implementation returns false.
Implements Dragengine.Scenery.BehaviorCompatiblePersistency.
|
protected |
Set behavior identifier to "<class-name>:<identifier>".
If identifier is empty string omits the double-colon.
|
protected |
Set behavior identifier to "<fully-qualified-class-name>:<identifier>".
If identifier is empty string omits the double-colon.