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

Behavior instance. More...

Inheritance diagram for Dragengine.Scenery.ECBehaviorHearSounds.Instance:
Dragengine.Scenery.DefaultECBehaviorInstance Dragengine.Scenery.SoundLevelMeterListener Dragengine.Scenery.ECBehaviorInstance

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...
 

Detailed Description

Behavior instance.

Member Function Documentation

◆ addAudibleElement() [1/2]

void Dragengine.Scenery.ECBehaviorHearSounds.Instance.addAudibleElement ( Element  element)
protected

◆ addAudibleElement() [2/2]

void Dragengine.Scenery.ECBehaviorHearSounds.Instance.addAudibleElement ( Speaker  speaker,
Element  element 
)
protected

Add audible element.

Version
1.19

◆ addListener()

void Dragengine.Scenery.ECBehaviorHearSounds.Instance.addListener ( Listener  listener)

Add listener.

◆ addListenerFactory() [1/2]

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

Add listener factory using block.

Block receives as parameter Instance and returns Listener.

◆ addListenerFactory() [2/2]

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

Add listener factory.

◆ addToGameWorld()

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

Add element to game world.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ attachSoundLevelMeter()

void Dragengine.Scenery.ECBehaviorHearSounds.Instance.attachSoundLevelMeter ( StubElement  stub,
ECBehaviorCollider.Instance  collider 
)
protected

Attach sound level meter to collider.

Default implementation calls ECComposeAttachResource.attach().

◆ createListeners()

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

Create listeners from factories adding them to behavior instance.

◆ createSoundLevelMeter()

SoundLevelMeter Dragengine.Scenery.ECBehaviorHearSounds.Instance.createSoundLevelMeter ( StubElement  stub)
protected

Create sound level meter.

◆ dispose() [1/2]

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

Dispose of behavior instance.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ dispose() [2/2]

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

Dispose of behavior.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ forEachListenerFactory()

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

Visit listener factories with block with argument ListenerFactory.

◆ getAttach()

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

Attach resource.

◆ getAudibleDistance() [1/2]

float Dragengine.Scenery.ECBehaviorHearSounds.Instance.getAudibleDistance ( )

Audible distance in meters.

◆ getAudibleDistance() [2/2]

ECPFloat Dragengine.Scenery.ECBehaviorHearSounds.Instance.getAudibleDistance ( )

Audible distance.

◆ getAudibleElementAt()

Element Dragengine.Scenery.ECBehaviorHearSounds.Instance.getAudibleElementAt ( int  index)

Audible element at index.

◆ getAudibleElementCount()

int Dragengine.Scenery.ECBehaviorHearSounds.Instance.getAudibleElementCount ( )

Number of audible elements.

◆ getAudibleElementVolume()

float Dragengine.Scenery.ECBehaviorHearSounds.Instance.getAudibleElementVolume ( Element  element)

Get volume of element.

◆ getBehaviorIn()

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

◆ getCollider() [1/2]

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

Collider behavior or null if not attached.

◆ getCollider() [2/2]

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

Collider behavior or null to not attach.

◆ getECBehavior()

ECBehaviorHearSounds Dragengine.Scenery.ECBehaviorHearSounds.Instance.getECBehavior ( )

Behavior.

◆ getLayerMask()

LayerMask Dragengine.Scenery.ECBehaviorHearSounds.Instance.getLayerMask ( )

Layer mask.

◆ getListening()

bool Dragengine.Scenery.ECBehaviorHearSounds.Instance.getListening ( )

Behavior element is listening.

◆ getSoundLevelMeter()

SoundLevelMeter Dragengine.Scenery.ECBehaviorHearSounds.Instance.getSoundLevelMeter ( )

Sound level meter.

◆ getVolumeThreshold() [1/2]

float Dragengine.Scenery.ECBehaviorHearSounds.Instance.getVolumeThreshold ( )

Volume threshold required for elements to be considered audible.

◆ getVolumeThreshold() [2/2]

ECPFloat Dragengine.Scenery.ECBehaviorHearSounds.Instance.getVolumeThreshold ( )

Volume threshold required for elements to be considered audible.

◆ init()

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

Initialize element from stub.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ isElementAudible()

bool Dragengine.Scenery.ECBehaviorHearSounds.Instance.isElementAudible ( Element  element)

Element is audible.

◆ new() [1/2]

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

◆ new() [2/2]

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

Create element.

◆ removeAudibleElement()

void Dragengine.Scenery.ECBehaviorHearSounds.Instance.removeAudibleElement ( Element  element)
protected

Remove audible element.

◆ removeFromGameWorld()

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

Remove element from game world.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ removeListener()

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

Remove listener.

◆ setAudibleDistance()

void Dragengine.Scenery.ECBehaviorHearSounds.Instance.setAudibleDistance ( float  range)
protected

Set audible range in meters.

◆ setLayerMask()

void Dragengine.Scenery.ECBehaviorHearSounds.Instance.setLayerMask ( LayerMask  layerMask)

Set layer mask.

◆ setListening()

void Dragengine.Scenery.ECBehaviorHearSounds.Instance.setListening ( bool  listening)

Set if behavior element is listening.

◆ setVolumeThreshold()

void Dragengine.Scenery.ECBehaviorHearSounds.Instance.setVolumeThreshold ( float  volume)
protected

Set volume threshold required for elements to be considered audible.

Member Data Documentation

◆ pAudibleDistance

float Dragengine.Scenery.ECBehaviorHearSounds.Instance.pAudibleDistance

◆ pAudibleElements

Array Dragengine.Scenery.ECBehaviorHearSounds.Instance.pAudibleElements

◆ pCollider

ECBehaviorCollider.Instance Dragengine.Scenery.ECBehaviorHearSounds.Instance.pCollider

◆ pECBehavior

ECBehaviorHearSounds Dragengine.Scenery.ECBehaviorHearSounds.Instance.pECBehavior

◆ pListeners

Array Dragengine.Scenery.ECBehaviorHearSounds.Instance.pListeners

◆ pSoundLevelMeter

SoundLevelMeter Dragengine.Scenery.ECBehaviorHearSounds.Instance.pSoundLevelMeter

◆ pTrackedElements

Array Dragengine.Scenery.ECBehaviorHearSounds.Instance.pTrackedElements

◆ pVolumeThreshold

float Dragengine.Scenery.ECBehaviorHearSounds.Instance.pVolumeThreshold

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