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

Behavior element behavior adding anchor element support. More...

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

Classes

class  Instance
 Behavior instance. More...
 

Public Member Functions

ECBehaviorInstance createInstance (BehaviorElement element)
 Create Behavior instance. More...
 
ECPStringID getAnchorID ()
 Anchor name or empty string to not anchor. More...
 
Instance instance (BehaviorElement element)
 Get instance in element from owner element class. More...
 
ECBehaviorAnchorElement new (BehaviorElementClass eclass)
 Create behavior element class. More...
 
ECBehaviorAnchorElement new (BehaviorElementClass eclass, String propertyName)
 Create default composeable behavior. More...
 
- 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...
 

Static Public Member Functions

static ECBehaviorAnchorElement getBehaviorIn (BehaviorElementClass eclass)
 Get behavior in element class or null if absent. More...
 
static Instance getInstanceIn (BehaviorElement element)
 Get instance in element or null if absent. More...
 

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 element behavior adding anchor element support.

Anchoring elements allows to locate elements in a GameWorld using a unique name set by the mapper. This is useful for game commands send by conversations scripts.

Element class property has name "anchorID".

This element behavior can be present only once in a BehaviorElement. Trying to add more than one instance results in an exception thrown.

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

Member Function Documentation

◆ createInstance()

ECBehaviorInstance Dragengine.Scenery.ECBehaviorAnchorElement.createInstance ( BehaviorElement  element)

Create Behavior instance.

Implements Dragengine.Scenery.ECBehavior.

◆ getAnchorID()

ECPStringID Dragengine.Scenery.ECBehaviorAnchorElement.getAnchorID ( )

Anchor name or empty string to not anchor.

◆ getBehaviorIn()

static ECBehaviorAnchorElement Dragengine.Scenery.ECBehaviorAnchorElement.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.

◆ getInstanceIn()

static Instance Dragengine.Scenery.ECBehaviorAnchorElement.getInstanceIn ( BehaviorElement  element)
static

Get instance in element or null if absent.

Use this method to check if a particular BehaviorElement contains a behavior instance of type ECBehaviorAnchorElement.Instance . If more than one instance is present returns the first instance.

◆ instance()

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

Get instance in element from owner element class.

◆ new() [1/2]

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

Create behavior element class.

Reimplemented from Dragengine.Scenery.DefaultECBehavior.

◆ new() [2/2]

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

Create default composeable behavior.

Reimplemented from Dragengine.Scenery.DefaultECBehavior.


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