Drag[en]gine Script Module DragonScript  1.23
Dragengine.Scenery.DefaultECBehavior Class Reference

Default implementation of ECBehavior. More...

Inheritance diagram for Dragengine.Scenery.DefaultECBehavior:
Dragengine.Scenery.ECBehavior Dragengine.Scenery.BehaviorCompatiblePersistency Dragengine.Gui.MainMenus.Interactive.IMMBehaviorColliderInteract Dragengine.Gui.MainMenus.Interactive.IMMBehaviorHotSpot Dragengine.Scenery.ECBCTRRBindings Dragengine.Scenery.ECBehaviorActorAIAction Dragengine.Scenery.ECBehaviorActorAnimated Dragengine.Scenery.ECBehaviorActorCutscene Dragengine.Scenery.ECBehaviorActorIK Dragengine.Scenery.ECBehaviorActorMover Dragengine.Scenery.ECBehaviorActorMoverUnstuck Dragengine.Scenery.ECBehaviorActorTransmission Dragengine.Scenery.ECBehaviorAlignActor Dragengine.Scenery.ECBehaviorAnchorElement Dragengine.Scenery.ECBehaviorAnimated Dragengine.Scenery.ECBehaviorAnnouncer Dragengine.Scenery.ECBehaviorAttachDynamicSkin Dragengine.Scenery.ECBehaviorAttachSlot Dragengine.Scenery.ECBehaviorAttachToParent Dragengine.Scenery.ECBehaviorAttachable Dragengine.Scenery.ECBehaviorAttachments Dragengine.Scenery.ECBehaviorAvoidCollision Dragengine.Scenery.ECBehaviorAvoidedByActor Dragengine.Scenery.ECBehaviorBehaviorTree Dragengine.Scenery.ECBehaviorBehaviorTreeFlags Dragengine.Scenery.ECBehaviorBehaviorTreeTimer Dragengine.Scenery.ECBehaviorBillboard Dragengine.Scenery.ECBehaviorBodyTilting Dragengine.Scenery.ECBehaviorCamera Dragengine.Scenery.ECBehaviorClearPath Dragengine.Scenery.ECBehaviorCollider Dragengine.Scenery.ECBehaviorColliderAI Dragengine.Scenery.ECBehaviorComponent Dragengine.Scenery.ECBehaviorComposed Dragengine.Scenery.ECBehaviorControlDesktop Dragengine.Scenery.ECBehaviorConversation Dragengine.Scenery.ECBehaviorConversationActor Dragengine.Scenery.ECBehaviorConvoCoordSystem Dragengine.Scenery.ECBehaviorCustomColor Dragengine.Scenery.ECBehaviorDayTimeSky Dragengine.Scenery.ECBehaviorDecal Dragengine.Scenery.ECBehaviorDynamicSkin Dragengine.Scenery.ECBehaviorEnvMapProbe Dragengine.Scenery.ECBehaviorEvaluate Dragengine.Scenery.ECBehaviorFootSteps Dragengine.Scenery.ECBehaviorForceField Dragengine.Scenery.ECBehaviorGrabSpot Dragengine.Scenery.ECBehaviorGrabber Dragengine.Scenery.ECBehaviorHearSounds Dragengine.Scenery.ECBehaviorHitScan Dragengine.Scenery.ECBehaviorInteractPrompt Dragengine.Scenery.ECBehaviorInteractionSpot Dragengine.Scenery.ECBehaviorInventory Dragengine.Scenery.ECBehaviorLight Dragengine.Scenery.ECBehaviorLightDimmer Dragengine.Scenery.ECBehaviorLocomotion Dragengine.Scenery.ECBehaviorLookAt Dragengine.Scenery.ECBehaviorLookedAt Dragengine.Scenery.ECBehaviorMoveOnRail Dragengine.Scenery.ECBehaviorNStateGeometry Dragengine.Scenery.ECBehaviorNStateLocomotion Dragengine.Scenery.ECBehaviorNavigationBlocker Dragengine.Scenery.ECBehaviorNavigationSpace Dragengine.Scenery.ECBehaviorNavigator Dragengine.Scenery.ECBehaviorNetworkState Dragengine.Scenery.ECBehaviorOccupier Dragengine.Scenery.ECBehaviorOutline Dragengine.Scenery.ECBehaviorParameterTable Dragengine.Scenery.ECBehaviorParticleEmitter Dragengine.Scenery.ECBehaviorPlaySound Dragengine.Scenery.ECBehaviorPlayerControllable Dragengine.Scenery.ECBehaviorPlayerInputCrouch Dragengine.Scenery.ECBehaviorPlayerInputLook Dragengine.Scenery.ECBehaviorPlayerInputMove Dragengine.Scenery.ECBehaviorPlayerInputTurn Dragengine.Scenery.ECBehaviorPlayerInteractPrompt Dragengine.Scenery.ECBehaviorPlayerLookAtInteractPrompt Dragengine.Scenery.ECBehaviorProjectToGround Dragengine.Scenery.ECBehaviorRandomizeCreation Dragengine.Scenery.ECBehaviorRandomizeGeometry Dragengine.Scenery.ECBehaviorRenderableCamera Dragengine.Scenery.ECBehaviorRenderableCanvas Dragengine.Scenery.ECBehaviorRenderableCanvasBase Dragengine.Scenery.ECBehaviorRenderableCustomColor Dragengine.Scenery.ECBehaviorRenderableDesktop Dragengine.Scenery.ECBehaviorRenderableLight Dragengine.Scenery.ECBehaviorRenderablePanel Dragengine.Scenery.ECBehaviorRidable Dragengine.Scenery.ECBehaviorRideOn Dragengine.Scenery.ECBehaviorShowElement Dragengine.Scenery.ECBehaviorShowMessage Dragengine.Scenery.ECBehaviorSkinSwitcher Dragengine.Scenery.ECBehaviorSky Dragengine.Scenery.ECBehaviorSpeaker Dragengine.Scenery.ECBehaviorStashable Dragengine.Scenery.ECBehaviorStateMachine Dragengine.Scenery.ECBehaviorStepAside Dragengine.Scenery.ECBehaviorTimer Dragengine.Scenery.ECBehaviorToggle Dragengine.Scenery.ECBehaviorTouchSensor Dragengine.Scenery.ECBehaviorTouching Dragengine.Scenery.ECBehaviorTriggered Dragengine.Scenery.ECBehaviorTwoStateAnimated Dragengine.Scenery.ECBehaviorVRControlDesktop Dragengine.Scenery.ECBehaviorVRHMD Dragengine.Scenery.ECBehaviorVRHand Dragengine.Scenery.ECBehaviorVRHandAction Dragengine.Scenery.ECBehaviorVRHandLaserPointer Dragengine.Scenery.ECBehaviorVRHandPointAt Dragengine.Scenery.ECBehaviorVRHandPointedAt Dragengine.Scenery.ECBehaviorVRHandPose Dragengine.Scenery.ECBehaviorVRPlayspace

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...
 

Detailed Description

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.

Member Function Documentation

◆ assignInstanceIndex()

void Dragengine.Scenery.DefaultECBehavior.assignInstanceIndex ( int  instanceIndex)

Assign instance index.

Warning
For use by BehaviorElementClass only! Do not call yourself!

Implements Dragengine.Scenery.ECBehavior.

◆ dispose()

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.

◆ getBehaviorID()

String Dragengine.Scenery.DefaultECBehavior.getBehaviorID ( )

Unique identifier of behavior.

Version
1.5

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.

◆ getID()

String Dragengine.Scenery.DefaultECBehavior.getID ( )

Identifier.

◆ getInstanceIndex()

int Dragengine.Scenery.DefaultECBehavior.getInstanceIndex ( )

Instance index.

Implements Dragengine.Scenery.ECBehavior.

◆ loadSupportedData()

void Dragengine.Scenery.DefaultECBehavior.loadSupportedData ( String  identifier,
PersistencyEnvironment  env,
FileReader  reader,
ECBehaviorInstance  instance 
)

Load instance data of another behavior.

Version
1.5

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.

◆ new() [1/2]

◆ new() [2/2]

◆ setBehaviorID()

void Dragengine.Scenery.DefaultECBehavior.setBehaviorID ( String  identifier)
protected

Set behavior identifier.

Version
1.5
Note
Call this only during the constructor. Behavior identifier has to be static during the entire life time of the behavior.

◆ supportsBehaviorID()

bool Dragengine.Scenery.DefaultECBehavior.supportsBehaviorID ( String  identifier)

Behavior supports loading instance data of another behavior.

Version
1.5

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.

◆ useClassNameAsBehaviorID()

void Dragengine.Scenery.DefaultECBehavior.useClassNameAsBehaviorID ( )
protected

Set behavior identifier to "<class-name>:<identifier>".

Version
1.5

If identifier is empty string omits the double-colon.

Note
Call this only during the constructor. Behavior identifier has to be static during the entire life time of the behavior.

◆ useFullyQualifiedClassNameAsBehaviorID()

void Dragengine.Scenery.DefaultECBehavior.useFullyQualifiedClassNameAsBehaviorID ( )
protected

Set behavior identifier to "<fully-qualified-class-name>:<identifier>".

Version
1.5

If identifier is empty string omits the double-colon.

Note
Call this only during the constructor. Behavior identifier has to be static during the entire life time of the behavior.

The documentation for this class was generated from the following file: