Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
Dragengine.Scenery.ECBehaviorComponent.Instance Class Reference

Behavior instance. More...

Inheritance diagram for Dragengine.Scenery.ECBehaviorComponent.Instance:
Dragengine.Scenery.DefaultECBehaviorInstance Dragengine.Scenery.ECBehaviorInstance

Public Member Functions

void addToGameWorld ()
 Add element to game world.
Component getComponent ()
 Component.
ECBehaviorComponent getECBehavior ()
 Behavior.
TextureReplacementList getTextureReplacements ()
 Texture replacements.
Skin getUsedSkin (String texture)
 Skin in use for texture.
Skin getUsedSkin (String texture, ObjectReference textureNumber)
 Skin in use for texture.
void init (StubElement stub)
 Initialize element from stub.
Instance new (ECBehaviorComponent ecbehavior, BehaviorElement element)
 Create element.
void removeFromGameWorld ()
 Remove element from game world.
void stateChanged ()
 State changed (visble, touchable).
Public Member Functions inherited from Dragengine.Scenery.DefaultECBehaviorInstance
void attachToParent (Element parent)
 Attach element to object set by the mapper in the IGDE World Editor.
void dispose ()
 Dispose of behavior instance.
void enterFrame ()
 Frame update started.
void geometryChanged ()
 Position or orientation changed.
BehaviorElement getElement ()
 Behavior element to apply behavior to.
int getInstanceIndex ()
 Behavior instance index.
DefaultECBehaviorInstance new (BehaviorElement element)
 Create default composeable instance.
void postThink (float elapsed)
 Post thinking after physics processing is finished.
void readFromFile (PersistencyEnvironment env, FileReader reader)
 Read behavior instance from file.
bool requiresEnterFrame ()
 Behavior instance requires enterFrame() to be called.
bool requiresThink ()
 Behavior instance requires think() to be called.
void think (float elapsed)
 Think about what to do for the next frame update.
void writeToFile (PersistencyEnvironment env, FileWriter writer)
 Write behavior instance to file.

Protected Member Functions

void attachComponent (StubElement stub, ECBehaviorCollider.Instance collider)
 Attach component to collider.
Component createComponent (StubElement stub)
 Create component for the element.
LayerMask createLayerMask (StubElement stub)
 Create component layer mask.
void replaceComponentTextures (Component component, StubElement stub)
 Replace textures using element class and a stub.
Protected Member Functions inherited from Dragengine.Scenery.DefaultECBehaviorInstance
void setRequiresEnterFrame (bool required)
 Set if behavior instance requires enterFrame() to be called.
void setRequiresThink (bool required)
 Set if behavior instance requires think() to be called.

Additional Inherited Members

Public Attributes inherited from Dragengine.Scenery.DefaultECBehaviorInstance
BehaviorElement pElement
int pInstanceIndex
bool pRequiresEnterFrame
bool pRequiresThink

Detailed Description

Behavior instance.

Member Function Documentation

◆ addToGameWorld()

void Dragengine.Scenery.ECBehaviorComponent.Instance.addToGameWorld ( )

Add element to game world.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ attachComponent()

void Dragengine.Scenery.ECBehaviorComponent.Instance.attachComponent ( StubElement stub,
ECBehaviorCollider.Instance collider )
protected

Attach component to collider.

Called if ECBehaviorCollider is present in the behavior element. The default implementation attaches the component statically to the collider. For this to work the component has to be in the right position relative to the collider.

References Dragengine.Scenery.DefaultECBehaviorInstance.getElement().

Referenced by getTextureReplacements().

◆ createComponent()

Component Dragengine.Scenery.ECBehaviorComponent.Instance.createComponent ( StubElement stub)
protected

Create component for the element.

The default implementation creates a component using the component parameters stored in the element class. If not all required resources can be found an exception is thrown. Overwrite to modify component creation process using parameters stored in the sub if required.

Referenced by createLayerMask(), and getUsedSkin().

◆ createLayerMask()

LayerMask Dragengine.Scenery.ECBehaviorComponent.Instance.createLayerMask ( StubElement stub)
protected

Create component layer mask.

Default implementation calls ECComposeComponent.createLayerMask.

References createComponent(), and init().

Referenced by removeFromGameWorld().

◆ getComponent()

Component Dragengine.Scenery.ECBehaviorComponent.Instance.getComponent ( )

◆ getECBehavior()

ECBehaviorComponent Dragengine.Scenery.ECBehaviorComponent.Instance.getECBehavior ( )

◆ getTextureReplacements()

TextureReplacementList Dragengine.Scenery.ECBehaviorComponent.Instance.getTextureReplacements ( )

Texture replacements.

References attachComponent().

◆ getUsedSkin() [1/2]

Skin Dragengine.Scenery.ECBehaviorComponent.Instance.getUsedSkin ( String texture)

Skin in use for texture.

If component texture is set and skîn is assigned returns component texture skin. Otherwise returns component skin.

References createComponent(), getComponent(), and replaceComponentTextures().

◆ getUsedSkin() [2/2]

Skin Dragengine.Scenery.ECBehaviorComponent.Instance.getUsedSkin ( String texture,
ObjectReference textureNumber )

Skin in use for texture.

If component texture is set and skîn is assigned returns component texture skin. Otherwise returns component skin.

◆ init()

void Dragengine.Scenery.ECBehaviorComponent.Instance.init ( StubElement stub)

Initialize element from stub.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

References getComponent().

Referenced by createLayerMask().

◆ new()

Instance Dragengine.Scenery.ECBehaviorComponent.Instance.new ( ECBehaviorComponent ecbehavior,
BehaviorElement element )

Create element.

References getComponent().

Referenced by replaceComponentTextures().

◆ removeFromGameWorld()

void Dragengine.Scenery.ECBehaviorComponent.Instance.removeFromGameWorld ( )

Remove element from game world.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

References createLayerMask(), and getComponent().

◆ replaceComponentTextures()

void Dragengine.Scenery.ECBehaviorComponent.Instance.replaceComponentTextures ( Component component,
StubElement stub )
protected

Replace textures using element class and a stub.

References new().

Referenced by getUsedSkin(), and stateChanged().

◆ stateChanged()

void Dragengine.Scenery.ECBehaviorComponent.Instance.stateChanged ( )

State changed (visble, touchable).

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

References getComponent(), and replaceComponentTextures().


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