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

Behavior adding support to elements to be avoided by actors. More...

Inheritance diagram for Dragengine.Scenery.ECBehaviorAvoidedByActor:
Dragengine.Scenery.DefaultECBehavior Dragengine.Scenery.ECBehavior Dragengine.Scenery.BehaviorCompatiblePersistency

Classes

class  Instance
 Behavior instance. More...
 

Public Member Functions

ECPFloat getOrientation ()
 Orientation along world Y axis relative to element world Y orientation. More...
 
ECPVector getOrigin ()
 Origin relative to element. More...
 
ECPFloat getRadius ()
 Radius. More...
 
ECPVector2 getSize ()
 Size. More...
 
Instance instance (BehaviorElement element)
 Get instance in element from owner element class. More...
 
ECBehaviorAvoidedByActor new (BehaviorElementClass eclass)
 Create behavior element class. More...
 
ECBehaviorAvoidedByActor new (BehaviorElementClass eclass, String id)
 Create default composeable behavior. More...
 
ECBehaviorAvoidedByActor new (BehaviorElementClass eclass, String id, String subId)
 
ECBehaviorAvoidedByActor new (BehaviorElementClass eclass, String id, String subId, String prefix)
 
- Public Member Functions inherited from Dragengine.Scenery.DefaultECBehavior
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...
 

Static Public Member Functions

static ECBehaviorAvoidedByActor getBehaviorIn (BehaviorElementClass eclass)
 Get behavior in element class or null if absent. More...
 

Public Attributes

ECPFloat pOrientation
 
ECPVector pOrigin
 
ECPFloat pRadius
 
ECPVector2 pSize
 

Additional Inherited Members

- Protected Member Functions inherited from Dragengine.Scenery.DefaultECBehavior
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

Behavior adding support to elements to be avoided by actors.

Avoid shape is defined by position, half-size and radius. This allows to model spheres and round boxes as avoid shapes projected to the ground. The behavior can be enabled and disabled to allow define avoid shapes activate only at specific times. Although not prohibited shapes should not move to allow behaviors doing avoiding to work the best way possible.

This behavior can be added multiple times to add multiple avoid shapes.

The property prefix is "avoidedByActor{(id)}".

This behavior does not require element class to be persistable (setPersistable).

Member Function Documentation

◆ getBehaviorIn()

static ECBehaviorAvoidedByActor Dragengine.Scenery.ECBehaviorAvoidedByActor.getBehaviorIn ( BehaviorElementClass  eclass)
static

Get behavior in element class or null if absent.

Use this method to check if a particular BehaviorElementClass contains a behavior of type ECBehaviorCollider.

◆ getOrientation()

ECPFloat Dragengine.Scenery.ECBehaviorAvoidedByActor.getOrientation ( )

Orientation along world Y axis relative to element world Y orientation.

◆ getOrigin()

ECPVector Dragengine.Scenery.ECBehaviorAvoidedByActor.getOrigin ( )

Origin relative to element.

◆ getRadius()

ECPFloat Dragengine.Scenery.ECBehaviorAvoidedByActor.getRadius ( )

Radius.

◆ getSize()

ECPVector2 Dragengine.Scenery.ECBehaviorAvoidedByActor.getSize ( )

Size.

◆ instance()

Instance Dragengine.Scenery.ECBehaviorAvoidedByActor.instance ( BehaviorElement  element)

Get instance in element from owner element class.

◆ new() [1/4]

ECBehaviorAvoidedByActor Dragengine.Scenery.ECBehaviorAvoidedByActor.new ( BehaviorElementClass  eclass)

Create behavior element class.

Reimplemented from Dragengine.Scenery.DefaultECBehavior.

◆ new() [2/4]

ECBehaviorAvoidedByActor Dragengine.Scenery.ECBehaviorAvoidedByActor.new ( BehaviorElementClass  eclass,
String  id 
)

Create default composeable behavior.

Reimplemented from Dragengine.Scenery.DefaultECBehavior.

◆ new() [3/4]

ECBehaviorAvoidedByActor Dragengine.Scenery.ECBehaviorAvoidedByActor.new ( BehaviorElementClass  eclass,
String  id,
String  subId 
)

◆ new() [4/4]

ECBehaviorAvoidedByActor Dragengine.Scenery.ECBehaviorAvoidedByActor.new ( BehaviorElementClass  eclass,
String  id,
String  subId,
String  prefix 
)

Member Data Documentation

◆ pOrientation

ECPFloat Dragengine.Scenery.ECBehaviorAvoidedByActor.pOrientation

◆ pOrigin

ECPVector Dragengine.Scenery.ECBehaviorAvoidedByActor.pOrigin

◆ pRadius

ECPFloat Dragengine.Scenery.ECBehaviorAvoidedByActor.pRadius

◆ pSize

ECPVector2 Dragengine.Scenery.ECBehaviorAvoidedByActor.pSize

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