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

Behavior instance. More...

Inheritance diagram for Dragengine.Scenery.ECBehaviorTouchSensor.Instance:
Dragengine.Scenery.DefaultECBehaviorInstance Dragengine.Scenery.TouchSensorListener Dragengine.Scenery.ECBehaviorInstance

Public Member Functions

void addListenerFactory (Block blockFactory)
 Add listener factory using block. More...
 
void addListenerFactory (ListenerFactory factory)
 Add listener factory. More...
 
void addToGameWorld ()
 Add element to game world. More...
 
void createListeners (Instance instance)
 Create listeners from factories adding them to behavior instance. More...
 
void dispose ()
 Dispose of behavior instance. More...
 
void dispose ()
 Dispose of behavior. More...
 
Element findTouchingElement (Block ablock)
 Find touching elements with block with parameter Element. More...
 
Element findTouchingElementCastable (Block ablock)
 Find touching elements castable to block parameter. More...
 
void forEachListenerFactory (Block ablock)
 Visit listener factories with block with argument ListenerFactory. More...
 
void forEachTouchingElement (Block ablock)
 Visit touching elements with block with parameter Element. More...
 
void forEachTouchingElementCastable (Block ablock)
 Visit touching elements castable to block parameter. More...
 
ECComposeAttachResource getAttach ()
 Attach resource. More...
 
ECBehaviorCollider.Instance getCollider ()
 Collider behavior instance or null if not used. More...
 
ECBehaviorCollider getCollider ()
 Collider behavior or null if not used. More...
 
ECComposeCollisionFilter getCollisionFilter ()
 Collision filter. More...
 
ECBehaviorTouchSensor getECBehavior ()
 Behavior. More...
 
ECPShapeList getShape ()
 Touch shape. More...
 
ECPBoolean getShapeFromSize ()
 Use stub element scaling as touch sensor shape. More...
 
bool getTouching ()
 Touch sensor is sensing touches. More...
 
ECPBoolean getTouching ()
 Touch sensor is initially touching. More...
 
Element getTouchingElementAt (int index)
 Touching element at index. More...
 
int getTouchingElementCount ()
 Number of touching elements. More...
 
TouchSensor getTouchSensor ()
 Touch sensor. More...
 
void init (StubElement stub)
 Initialize element from stub. More...
 
bool isElementTouching (Element element)
 Element is touching. More...
 
Instance new (BehaviorElementClass eclass, ECBehaviorCollider collider, String id)
 
Instance new (BehaviorElementClass eclass, ECBehaviorCollider collider, String id, String prefix)
 
Instance new (ECBehaviorTouchSensor ecbehavior, BehaviorElement element)
 Create element. More...
 
void removeFromGameWorld ()
 Remove element from game world. More...
 
void removeListener (Listener listener)
 Remove listener. More...
 
void setTouching (bool touching)
 Set if touch sensor is sensing touches. More...
 
void visitTouchingElements (ElementVisitor visitor)
 Visit touching elements with ElementVisitor. More...
 
- 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. More...
 
void enterFrame ()
 Frame update started. More...
 
void geometryChanged ()
 Position or orientation changed. More...
 
BehaviorElement getElement ()
 Behavior element to apply behavior to. More...
 
int getInstanceIndex ()
 Behavior instance index. More...
 
DefaultECBehaviorInstance new (BehaviorElement element)
 Create default composeable instance. More...
 
void postThink (float elapsed)
 Post thinking after physics processing is finished. More...
 
void readFromFile (PersistencyEnvironment env, FileReader reader)
 Read behavior instance from file. More...
 
bool requiresEnterFrame ()
 Behavior instance requires enterFrame() to be called. More...
 
bool requiresThink ()
 Behavior instance requires think() to be called. More...
 
void stateChanged ()
 State changed (visble, touchable). More...
 
void think (float elapsed)
 Think about what to do for the next frame update. More...
 
void writeToFile (PersistencyEnvironment env, FileWriter writer)
 Write behavior instance to file. More...
 
- Public Member Functions inherited from Dragengine.Scenery.TouchSensorListener
void colliderEntered (Collider collider)
 Collider entered shape. More...
 
void colliderLeft (Collider collider)
 Collider left shape. More...
 

Static Public Member Functions

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

Public Attributes

ECBehaviorCollider.Instance pCollider
 
ECBehaviorTouchSensor pECBehavior
 
Array pListeners
 
Array pTouchingElements
 
TouchSensor pTouchSensor
 
Array pTrackedElements
 

Protected Member Functions

void addTouchingElement (Collider collider, Element element)
 Add touching element. More...
 
void addTouchingElement (Element element)
 
void attachTouchSensor (StubElement stub, ECBehaviorCollider.Instance collider)
 Attach touch sensor to collider. More...
 
TouchSensor createTouchSensor (StubElement stub)
 Create touch sensor. More...
 
void removeTouchingElement (Element element)
 Remove touching element. More...
 
- Protected Member Functions inherited from Dragengine.Scenery.DefaultECBehaviorInstance
void setRequiresEnterFrame (bool required)
 Set if behavior instance requires enterFrame() to be called. More...
 
void setRequiresThink (bool required)
 Set if behavior instance requires think() to be called. More...
 

Detailed Description

Behavior instance.

Member Function Documentation

◆ addListenerFactory() [1/2]

void Dragengine.Scenery.ECBehaviorTouchSensor.Instance.addListenerFactory ( Block  blockFactory)

Add listener factory using block.

Block receives as parameter Instance and returns Listener.

◆ addListenerFactory() [2/2]

void Dragengine.Scenery.ECBehaviorTouchSensor.Instance.addListenerFactory ( ListenerFactory  factory)

Add listener factory.

◆ addToGameWorld()

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

Add element to game world.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ addTouchingElement() [1/2]

void Dragengine.Scenery.ECBehaviorTouchSensor.Instance.addTouchingElement ( Collider  collider,
Element  element 
)
protected

Add touching element.

Version
1.19

◆ addTouchingElement() [2/2]

void Dragengine.Scenery.ECBehaviorTouchSensor.Instance.addTouchingElement ( Element  element)
protected

◆ attachTouchSensor()

void Dragengine.Scenery.ECBehaviorTouchSensor.Instance.attachTouchSensor ( StubElement  stub,
ECBehaviorCollider.Instance  collider 
)
protected

Attach touch sensor to collider.

Default implementation calls ECComposeAttachResource.attach().

◆ createListeners()

void Dragengine.Scenery.ECBehaviorTouchSensor.Instance.createListeners ( Instance  instance)

Create listeners from factories adding them to behavior instance.

◆ createTouchSensor()

TouchSensor Dragengine.Scenery.ECBehaviorTouchSensor.Instance.createTouchSensor ( StubElement  stub)
protected

Create touch sensor.

◆ dispose() [1/2]

void Dragengine.Scenery.ECBehaviorTouchSensor.Instance.dispose ( )

Dispose of behavior instance.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ dispose() [2/2]

void Dragengine.Scenery.ECBehaviorTouchSensor.Instance.dispose ( )

Dispose of behavior.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ findTouchingElement()

Element Dragengine.Scenery.ECBehaviorTouchSensor.Instance.findTouchingElement ( Block  ablock)

Find touching elements with block with parameter Element.

◆ findTouchingElementCastable()

Element Dragengine.Scenery.ECBehaviorTouchSensor.Instance.findTouchingElementCastable ( Block  ablock)

Find touching elements castable to block parameter.

Version
1.19

◆ forEachListenerFactory()

void Dragengine.Scenery.ECBehaviorTouchSensor.Instance.forEachListenerFactory ( Block  ablock)

Visit listener factories with block with argument ListenerFactory.

◆ forEachTouchingElement()

void Dragengine.Scenery.ECBehaviorTouchSensor.Instance.forEachTouchingElement ( Block  ablock)

Visit touching elements with block with parameter Element.

◆ forEachTouchingElementCastable()

void Dragengine.Scenery.ECBehaviorTouchSensor.Instance.forEachTouchingElementCastable ( Block  ablock)

Visit touching elements castable to block parameter.

Version
1.19

◆ getAttach()

ECComposeAttachResource Dragengine.Scenery.ECBehaviorTouchSensor.Instance.getAttach ( )

Attach resource.

◆ getBehaviorIn()

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

◆ getCollider() [1/2]

ECBehaviorCollider.Instance Dragengine.Scenery.ECBehaviorTouchSensor.Instance.getCollider ( )

Collider behavior instance or null if not used.

◆ getCollider() [2/2]

ECBehaviorCollider Dragengine.Scenery.ECBehaviorTouchSensor.Instance.getCollider ( )

Collider behavior or null if not used.

◆ getCollisionFilter()

ECComposeCollisionFilter Dragengine.Scenery.ECBehaviorTouchSensor.Instance.getCollisionFilter ( )

Collision filter.

◆ getECBehavior()

ECBehaviorTouchSensor Dragengine.Scenery.ECBehaviorTouchSensor.Instance.getECBehavior ( )

Behavior.

◆ getShape()

ECPShapeList Dragengine.Scenery.ECBehaviorTouchSensor.Instance.getShape ( )

Touch shape.

◆ getShapeFromSize()

ECPBoolean Dragengine.Scenery.ECBehaviorTouchSensor.Instance.getShapeFromSize ( )

Use stub element scaling as touch sensor shape.

◆ getTouching() [1/2]

bool Dragengine.Scenery.ECBehaviorTouchSensor.Instance.getTouching ( )

Touch sensor is sensing touches.

◆ getTouching() [2/2]

ECPBoolean Dragengine.Scenery.ECBehaviorTouchSensor.Instance.getTouching ( )

Touch sensor is initially touching.

Version
1.19

◆ getTouchingElementAt()

Element Dragengine.Scenery.ECBehaviorTouchSensor.Instance.getTouchingElementAt ( int  index)

Touching element at index.

◆ getTouchingElementCount()

int Dragengine.Scenery.ECBehaviorTouchSensor.Instance.getTouchingElementCount ( )

Number of touching elements.

◆ getTouchSensor()

TouchSensor Dragengine.Scenery.ECBehaviorTouchSensor.Instance.getTouchSensor ( )

Touch sensor.

◆ init()

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

Initialize element from stub.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ isElementTouching()

bool Dragengine.Scenery.ECBehaviorTouchSensor.Instance.isElementTouching ( Element  element)

Element is touching.

◆ new() [1/3]

Instance Dragengine.Scenery.ECBehaviorTouchSensor.Instance.new ( BehaviorElementClass  eclass,
ECBehaviorCollider  collider,
String  id 
)

◆ new() [2/3]

Instance Dragengine.Scenery.ECBehaviorTouchSensor.Instance.new ( BehaviorElementClass  eclass,
ECBehaviorCollider  collider,
String  id,
String  prefix 
)

◆ new() [3/3]

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

Create element.

◆ removeFromGameWorld()

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

Remove element from game world.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ removeListener()

void Dragengine.Scenery.ECBehaviorTouchSensor.Instance.removeListener ( Listener  listener)

Remove listener.

◆ removeTouchingElement()

void Dragengine.Scenery.ECBehaviorTouchSensor.Instance.removeTouchingElement ( Element  element)
protected

Remove touching element.

◆ setTouching()

void Dragengine.Scenery.ECBehaviorTouchSensor.Instance.setTouching ( bool  touching)

Set if touch sensor is sensing touches.

◆ visitTouchingElements()

void Dragengine.Scenery.ECBehaviorTouchSensor.Instance.visitTouchingElements ( ElementVisitor  visitor)

Visit touching elements with ElementVisitor.

Member Data Documentation

◆ pCollider

ECBehaviorCollider.Instance Dragengine.Scenery.ECBehaviorTouchSensor.Instance.pCollider

◆ pECBehavior

ECBehaviorTouchSensor Dragengine.Scenery.ECBehaviorTouchSensor.Instance.pECBehavior

◆ pListeners

Array Dragengine.Scenery.ECBehaviorTouchSensor.Instance.pListeners

◆ pTouchingElements

Array Dragengine.Scenery.ECBehaviorTouchSensor.Instance.pTouchingElements

◆ pTouchSensor

TouchSensor Dragengine.Scenery.ECBehaviorTouchSensor.Instance.pTouchSensor

◆ pTrackedElements

Array Dragengine.Scenery.ECBehaviorTouchSensor.Instance.pTrackedElements

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