Drag[en]gine Script Module DragonScript
1.23
|
Behavior instance. More...
Public Member Functions | |
void | addListener (Listener listener) |
Add listener. More... | |
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... | |
void | forEachListenerFactory (Block ablock) |
Visit listener factories with block with argument ListenerFactory. More... | |
ECComposeAttachResource | getAttach () |
Attach resource. More... | |
float | getAudibleDistance () |
Audible distance in meters. More... | |
ECPFloat | getAudibleDistance () |
Audible distance. More... | |
Element | getAudibleElementAt (int index) |
Audible element at index. More... | |
int | getAudibleElementCount () |
Number of audible elements. More... | |
float | getAudibleElementVolume (Element element) |
Get volume of element. More... | |
ECBehaviorCollider.Instance | getCollider () |
Collider behavior or null if not attached. More... | |
ECBehaviorCollider | getCollider () |
Collider behavior or null to not attach. More... | |
ECBehaviorHearSounds | getECBehavior () |
Behavior. More... | |
LayerMask | getLayerMask () |
Layer mask. More... | |
bool | getListening () |
Behavior element is listening. More... | |
SoundLevelMeter | getSoundLevelMeter () |
Sound level meter. More... | |
float | getVolumeThreshold () |
Volume threshold required for elements to be considered audible. More... | |
ECPFloat | getVolumeThreshold () |
Volume threshold required for elements to be considered audible. More... | |
void | init (StubElement stub) |
Initialize element from stub. More... | |
bool | isElementAudible (Element element) |
Element is audible. More... | |
Instance | new (BehaviorElementClass eclass, ECBehaviorCollider collider, String prefix) |
Instance | new (ECBehaviorHearSounds ecbehavior, BehaviorElement element) |
Create element. More... | |
void | removeFromGameWorld () |
Remove element from game world. More... | |
void | removeListener (Listener listener) |
Remove listener. More... | |
void | setLayerMask (LayerMask layerMask) |
Set layer mask. More... | |
void | setListening (bool listening) |
Set if behavior element is listening. 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.SoundLevelMeterListener | |
void | speakerAudible (SoundLevelMeterSpeaker speaker) |
Speaker become audible. More... | |
void | speakerInaudible (Speaker speaker) |
Speaker became inaudible. More... | |
Static Public Member Functions | |
static ECBehaviorHearSounds | getBehaviorIn (BehaviorElementClass eclass) |
Get behavior in element class or null if absent. More... | |
Public Attributes | |
float | pAudibleDistance |
Array | pAudibleElements |
ECBehaviorCollider.Instance | pCollider |
ECBehaviorHearSounds | pECBehavior |
Array | pListeners |
SoundLevelMeter | pSoundLevelMeter |
Array | pTrackedElements |
float | pVolumeThreshold |
Protected Member Functions | |
void | addAudibleElement (Element element) |
void | addAudibleElement (Speaker speaker, Element element) |
Add audible element. More... | |
void | attachSoundLevelMeter (StubElement stub, ECBehaviorCollider.Instance collider) |
Attach sound level meter to collider. More... | |
SoundLevelMeter | createSoundLevelMeter (StubElement stub) |
Create sound level meter. More... | |
void | removeAudibleElement (Element element) |
Remove audible element. More... | |
void | setAudibleDistance (float range) |
Set audible range in meters. More... | |
void | setVolumeThreshold (float volume) |
Set volume threshold required for elements to be considered audible. 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.
|
protected |
|
protected |
Add audible element.
void Dragengine.Scenery.ECBehaviorHearSounds.Instance.addListener | ( | Listener | listener | ) |
Add listener.
void Dragengine.Scenery.ECBehaviorHearSounds.Instance.addListenerFactory | ( | Block | blockFactory | ) |
void Dragengine.Scenery.ECBehaviorHearSounds.Instance.addListenerFactory | ( | ListenerFactory | factory | ) |
Add listener factory.
void Dragengine.Scenery.ECBehaviorHearSounds.Instance.addToGameWorld | ( | ) |
Add element to game world.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
|
protected |
Attach sound level meter to collider.
Default implementation calls ECComposeAttachResource.attach().
void Dragengine.Scenery.ECBehaviorHearSounds.Instance.createListeners | ( | Instance | instance | ) |
Create listeners from factories adding them to behavior instance.
|
protected |
Create sound level meter.
void Dragengine.Scenery.ECBehaviorHearSounds.Instance.dispose | ( | ) |
Dispose of behavior instance.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
void Dragengine.Scenery.ECBehaviorHearSounds.Instance.dispose | ( | ) |
Dispose of behavior.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
void Dragengine.Scenery.ECBehaviorHearSounds.Instance.forEachListenerFactory | ( | Block | ablock | ) |
Visit listener factories with block with argument ListenerFactory.
ECComposeAttachResource Dragengine.Scenery.ECBehaviorHearSounds.Instance.getAttach | ( | ) |
Attach resource.
float Dragengine.Scenery.ECBehaviorHearSounds.Instance.getAudibleDistance | ( | ) |
Audible distance in meters.
ECPFloat Dragengine.Scenery.ECBehaviorHearSounds.Instance.getAudibleDistance | ( | ) |
Audible distance.
Element Dragengine.Scenery.ECBehaviorHearSounds.Instance.getAudibleElementAt | ( | int | index | ) |
Audible element at index.
int Dragengine.Scenery.ECBehaviorHearSounds.Instance.getAudibleElementCount | ( | ) |
Number of audible elements.
float Dragengine.Scenery.ECBehaviorHearSounds.Instance.getAudibleElementVolume | ( | Element | element | ) |
Get volume of element.
|
static |
Get behavior in element class or null if absent.
Use this method to check if a particular BehaviorElementClass contains a behavior of type ECBehaviorHearSounds.
ECBehaviorCollider.Instance Dragengine.Scenery.ECBehaviorHearSounds.Instance.getCollider | ( | ) |
Collider behavior or null if not attached.
ECBehaviorCollider Dragengine.Scenery.ECBehaviorHearSounds.Instance.getCollider | ( | ) |
Collider behavior or null to not attach.
ECBehaviorHearSounds Dragengine.Scenery.ECBehaviorHearSounds.Instance.getECBehavior | ( | ) |
Behavior.
LayerMask Dragengine.Scenery.ECBehaviorHearSounds.Instance.getLayerMask | ( | ) |
Layer mask.
bool Dragengine.Scenery.ECBehaviorHearSounds.Instance.getListening | ( | ) |
Behavior element is listening.
SoundLevelMeter Dragengine.Scenery.ECBehaviorHearSounds.Instance.getSoundLevelMeter | ( | ) |
Sound level meter.
float Dragengine.Scenery.ECBehaviorHearSounds.Instance.getVolumeThreshold | ( | ) |
Volume threshold required for elements to be considered audible.
ECPFloat Dragengine.Scenery.ECBehaviorHearSounds.Instance.getVolumeThreshold | ( | ) |
Volume threshold required for elements to be considered audible.
void Dragengine.Scenery.ECBehaviorHearSounds.Instance.init | ( | StubElement | stub | ) |
Initialize element from stub.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
bool Dragengine.Scenery.ECBehaviorHearSounds.Instance.isElementAudible | ( | Element | element | ) |
Element is audible.
Instance Dragengine.Scenery.ECBehaviorHearSounds.Instance.new | ( | BehaviorElementClass | eclass, |
ECBehaviorCollider | collider, | ||
String | prefix | ||
) |
Instance Dragengine.Scenery.ECBehaviorHearSounds.Instance.new | ( | ECBehaviorHearSounds | ecbehavior, |
BehaviorElement | element | ||
) |
Create element.
|
protected |
Remove audible element.
void Dragengine.Scenery.ECBehaviorHearSounds.Instance.removeFromGameWorld | ( | ) |
Remove element from game world.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
void Dragengine.Scenery.ECBehaviorHearSounds.Instance.removeListener | ( | Listener | listener | ) |
Remove listener.
|
protected |
Set audible range in meters.
void Dragengine.Scenery.ECBehaviorHearSounds.Instance.setLayerMask | ( | LayerMask | layerMask | ) |
Set layer mask.
void Dragengine.Scenery.ECBehaviorHearSounds.Instance.setListening | ( | bool | listening | ) |
Set if behavior element is listening.
|
protected |
Set volume threshold required for elements to be considered audible.
float Dragengine.Scenery.ECBehaviorHearSounds.Instance.pAudibleDistance |
Array Dragengine.Scenery.ECBehaviorHearSounds.Instance.pAudibleElements |
ECBehaviorCollider.Instance Dragengine.Scenery.ECBehaviorHearSounds.Instance.pCollider |
ECBehaviorHearSounds Dragengine.Scenery.ECBehaviorHearSounds.Instance.pECBehavior |
Array Dragengine.Scenery.ECBehaviorHearSounds.Instance.pListeners |
SoundLevelMeter Dragengine.Scenery.ECBehaviorHearSounds.Instance.pSoundLevelMeter |
Array Dragengine.Scenery.ECBehaviorHearSounds.Instance.pTrackedElements |
float Dragengine.Scenery.ECBehaviorHearSounds.Instance.pVolumeThreshold |