Drag[en]gine Script Module DragonScript
1.23
|
Behavior instance. More...
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... | |
Behavior instance.
void Dragengine.Scenery.ECBehaviorTouchSensor.Instance.addListenerFactory | ( | Block | blockFactory | ) |
void Dragengine.Scenery.ECBehaviorTouchSensor.Instance.addListenerFactory | ( | ListenerFactory | factory | ) |
Add listener factory.
void Dragengine.Scenery.ECBehaviorTouchSensor.Instance.addToGameWorld | ( | ) |
Add element to game world.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
|
protected |
Add touching element.
|
protected |
|
protected |
Attach touch sensor to collider.
Default implementation calls ECComposeAttachResource.attach().
void Dragengine.Scenery.ECBehaviorTouchSensor.Instance.createListeners | ( | Instance | instance | ) |
Create listeners from factories adding them to behavior instance.
|
protected |
Create touch sensor.
void Dragengine.Scenery.ECBehaviorTouchSensor.Instance.dispose | ( | ) |
Dispose of behavior instance.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
void Dragengine.Scenery.ECBehaviorTouchSensor.Instance.dispose | ( | ) |
Dispose of behavior.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
Element Dragengine.Scenery.ECBehaviorTouchSensor.Instance.findTouchingElement | ( | Block | ablock | ) |
Find touching elements with block with parameter Element.
Element Dragengine.Scenery.ECBehaviorTouchSensor.Instance.findTouchingElementCastable | ( | Block | ablock | ) |
Find touching elements castable to block parameter.
void Dragengine.Scenery.ECBehaviorTouchSensor.Instance.forEachListenerFactory | ( | Block | ablock | ) |
Visit listener factories with block with argument ListenerFactory.
void Dragengine.Scenery.ECBehaviorTouchSensor.Instance.forEachTouchingElement | ( | Block | ablock | ) |
Visit touching elements with block with parameter Element.
void Dragengine.Scenery.ECBehaviorTouchSensor.Instance.forEachTouchingElementCastable | ( | Block | ablock | ) |
Visit touching elements castable to block parameter.
ECComposeAttachResource Dragengine.Scenery.ECBehaviorTouchSensor.Instance.getAttach | ( | ) |
Attach resource.
|
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.
ECBehaviorCollider.Instance Dragengine.Scenery.ECBehaviorTouchSensor.Instance.getCollider | ( | ) |
Collider behavior instance or null if not used.
ECBehaviorCollider Dragengine.Scenery.ECBehaviorTouchSensor.Instance.getCollider | ( | ) |
Collider behavior or null if not used.
ECComposeCollisionFilter Dragengine.Scenery.ECBehaviorTouchSensor.Instance.getCollisionFilter | ( | ) |
Collision filter.
ECBehaviorTouchSensor Dragengine.Scenery.ECBehaviorTouchSensor.Instance.getECBehavior | ( | ) |
Behavior.
ECPShapeList Dragengine.Scenery.ECBehaviorTouchSensor.Instance.getShape | ( | ) |
Touch shape.
ECPBoolean Dragengine.Scenery.ECBehaviorTouchSensor.Instance.getShapeFromSize | ( | ) |
Use stub element scaling as touch sensor shape.
bool Dragengine.Scenery.ECBehaviorTouchSensor.Instance.getTouching | ( | ) |
Touch sensor is sensing touches.
ECPBoolean Dragengine.Scenery.ECBehaviorTouchSensor.Instance.getTouching | ( | ) |
Touch sensor is initially touching.
Element Dragengine.Scenery.ECBehaviorTouchSensor.Instance.getTouchingElementAt | ( | int | index | ) |
Touching element at index.
int Dragengine.Scenery.ECBehaviorTouchSensor.Instance.getTouchingElementCount | ( | ) |
Number of touching elements.
TouchSensor Dragengine.Scenery.ECBehaviorTouchSensor.Instance.getTouchSensor | ( | ) |
Touch sensor.
void Dragengine.Scenery.ECBehaviorTouchSensor.Instance.init | ( | StubElement | stub | ) |
Initialize element from stub.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
bool Dragengine.Scenery.ECBehaviorTouchSensor.Instance.isElementTouching | ( | Element | element | ) |
Element is touching.
Instance Dragengine.Scenery.ECBehaviorTouchSensor.Instance.new | ( | BehaviorElementClass | eclass, |
ECBehaviorCollider | collider, | ||
String | id | ||
) |
Instance Dragengine.Scenery.ECBehaviorTouchSensor.Instance.new | ( | BehaviorElementClass | eclass, |
ECBehaviorCollider | collider, | ||
String | id, | ||
String | prefix | ||
) |
Instance Dragengine.Scenery.ECBehaviorTouchSensor.Instance.new | ( | ECBehaviorTouchSensor | ecbehavior, |
BehaviorElement | element | ||
) |
Create element.
void Dragengine.Scenery.ECBehaviorTouchSensor.Instance.removeFromGameWorld | ( | ) |
Remove element from game world.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
void Dragengine.Scenery.ECBehaviorTouchSensor.Instance.removeListener | ( | Listener | listener | ) |
Remove listener.
|
protected |
Remove touching element.
void Dragengine.Scenery.ECBehaviorTouchSensor.Instance.setTouching | ( | bool | touching | ) |
Set if touch sensor is sensing touches.
void Dragengine.Scenery.ECBehaviorTouchSensor.Instance.visitTouchingElements | ( | ElementVisitor | visitor | ) |
Visit touching elements with ElementVisitor.
ECBehaviorCollider.Instance Dragengine.Scenery.ECBehaviorTouchSensor.Instance.pCollider |
ECBehaviorTouchSensor Dragengine.Scenery.ECBehaviorTouchSensor.Instance.pECBehavior |
Array Dragengine.Scenery.ECBehaviorTouchSensor.Instance.pListeners |
Array Dragengine.Scenery.ECBehaviorTouchSensor.Instance.pTouchingElements |
TouchSensor Dragengine.Scenery.ECBehaviorTouchSensor.Instance.pTouchSensor |
Array Dragengine.Scenery.ECBehaviorTouchSensor.Instance.pTrackedElements |