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

Behavior element behavior adding decal projected onto ECBehaviorComponent. More...

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

Classes

class  Instance
 Behavior instance. More...
 

Public Member Functions

void dispose ()
 Dispose of behavior. More...
 
ECBehaviorComponent getComponent ()
 Component behavior to apply decal to. More...
 
ECPVector getOrientation ()
 Orientation to project decal from. More...
 
ECPVector getPosition ()
 Position to project decal from. More...
 
ECPVector getSize ()
 Size of decal to project. More...
 
ECPSkin getSkin ()
 Skin to apply to decal. More...
 
Instance instance (BehaviorElement element)
 Get instance in element from owner element class. More...
 
ECBehaviorDecal new (BehaviorElementClass eclass, ECBehaviorComponent component)
 Create behavior element class. More...
 
ECBehaviorDecal new (BehaviorElementClass eclass, ECBehaviorComponent component, String id)
 
ECBehaviorDecal new (BehaviorElementClass eclass, ECBehaviorComponent component, String id, String prefix)
 
- Public Member Functions inherited from Dragengine.Scenery.DefaultECBehavior
void assignInstanceIndex (int instanceIndex)
 Assign instance index. 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 ECBehaviorDecal getBehaviorIn (BehaviorElementClass eclass)
 Get behavior in element class or null if absent. More...
 

Additional Inherited Members

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

Behavior element behavior adding decal projected onto ECBehaviorComponent.

To use this behavior add first an ECBehaviorComponent. Then use setComponentID() to set the component behavior to project the decal upon. Only this component will received a decal instance.

Multiple ECBehaviorDecal instances can be added to add decals to individual ECBehaviorComponent instances using their identifiers like this example below.

class MyElement extends BehaviorElementClass
public func new()
ECBehaviorComponent.new(this)
ECBehaviorDecal.new(this)
ECBehaviorComponent.new(this, "subComponent")
var ECBehaviorDecal decal = ECBehaviorDecal.new(this, "subDecal")
decal.setComponentID("subComponent")
end
end
ECBehaviorDecal new(BehaviorElementClass eclass, ECBehaviorComponent component)
Create behavior element class.

The skin used on the decal is static. Use other behaviors to alter the decal at runtime.

Element class properties have the prefix "decal{(id)}.".

To apply decal to world elements (like decals loaded with game worlds) use ECBehaviorWorldDecal.

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

Member Function Documentation

◆ dispose()

void Dragengine.Scenery.ECBehaviorDecal.dispose ( )

Dispose of behavior.

Reimplemented from Dragengine.Scenery.DefaultECBehavior.

◆ getBehaviorIn()

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

◆ getComponent()

ECBehaviorComponent Dragengine.Scenery.ECBehaviorDecal.getComponent ( )

Component behavior to apply decal to.

◆ getOrientation()

ECPVector Dragengine.Scenery.ECBehaviorDecal.getOrientation ( )

Orientation to project decal from.

◆ getPosition()

ECPVector Dragengine.Scenery.ECBehaviorDecal.getPosition ( )

Position to project decal from.

◆ getSize()

ECPVector Dragengine.Scenery.ECBehaviorDecal.getSize ( )

Size of decal to project.

◆ getSkin()

ECPSkin Dragengine.Scenery.ECBehaviorDecal.getSkin ( )

Skin to apply to decal.

◆ instance()

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

Get instance in element from owner element class.

◆ new() [1/3]

ECBehaviorDecal Dragengine.Scenery.ECBehaviorDecal.new ( BehaviorElementClass  eclass,
ECBehaviorComponent  component 
)

Create behavior element class.

◆ new() [2/3]

ECBehaviorDecal Dragengine.Scenery.ECBehaviorDecal.new ( BehaviorElementClass  eclass,
ECBehaviorComponent  component,
String  id 
)

◆ new() [3/3]

ECBehaviorDecal Dragengine.Scenery.ECBehaviorDecal.new ( BehaviorElementClass  eclass,
ECBehaviorComponent  component,
String  id,
String  prefix 
)

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