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

Behavior instance. More...

Inheritance diagram for Dragengine.Scenery.ECBehaviorPlaySound.Instance:
Dragengine.Scenery.DefaultECBehaviorInstance Dragengine.Scenery.ECBehaviorInstance Dragengine.Scenery.ECBehaviorPlaySoundRandom.Instance

Classes

class  BTAPlay
 Behavior tree action "playSound{(id)}.play". More...
class  PlayListener
 Trigger listener to play soubd. More...

Public Member Functions

void dispose ()
 Dispose of composeable instance.
String getBone ()
 Relative bone or null.
int getBoneIndex ()
 Relative bone index.
ECBehaviorCollider.Instance getCollider ()
 Collider or null if not used.
ECBehaviorComponent.Instance getComponent ()
 Component or null if not used.
float getDistanceOffset ()
 Distance offset for attenuation calculation.
ECBehaviorPlaySound getECBehavior ()
 Behavior.
Quaternion getOrientation ()
 Relative orientation.
float getPlaySpeed ()
 Play speed.
Vector getPosition ()
 Relative position.
float getRange ()
 Range.
float getRollOff ()
 Roll-off factor.
Sound getSound ()
 Sound to play.
SpeakerType getSpeakerType ()
 Speaker type.
ECBehaviorTriggered.Instance getTrigger ()
 Trigger play or null if not used.
float getVolume ()
 Volume.
void init (StubElement stub)
 Initialize element from stub.
Instance new (ECBehaviorPlaySound ecbehavior, BehaviorElement element)
 Create element.
Speaker play ()
 Play sound as one shot speaker.
void setDistanceOffset (float distanceOffset)
 Set distance offset for attenuation calculation.
void updateBoneIndex ()
 Update bone index.
Public Member Functions inherited from Dragengine.Scenery.DefaultECBehaviorInstance
void addToGameWorld ()
 Add element to game world.
void attachToParent (Element parent)
 Attach element to object set by the mapper in the IGDE World Editor.
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.
void removeFromGameWorld ()
 Remove element from game world.
bool requiresEnterFrame ()
 Behavior instance requires enterFrame() to be called.
bool requiresThink ()
 Behavior instance requires think() to be called.
void stateChanged ()
 State changed (visble, touchable).
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.

Public Attributes

String pBone
int pBoneIndex
ECBehaviorCollider.Instance pCollider
ECBehaviorComponent.Instance pComponent
float pDistanceOffset
ECBehaviorPlaySound pECBehavior
Quaternion pOrientation
DMatrix pPlaySoundMatrix
float pPlaySpeed
Vector pPosition
float pRange
float pRollOff
Sound pSound
SpeakerType pSpeakerType
ECBehaviorTriggered.Instance pTrigger
float pVolume
Public Attributes inherited from Dragengine.Scenery.DefaultECBehaviorInstance
BehaviorElement pElement
int pInstanceIndex
bool pRequiresEnterFrame
bool pRequiresThink

Protected Member Functions

Speaker createSpeaker ()
 Create speaker.
void positionSpeaker (Speaker speaker)
 Position speaker.
void setBone (String bone)
 Set relative bone or null.
void setOrientation (Quaternion orientation)
 Set relative orientation.
void setPlaySpeed (float playSpeed)
 Set play speed.
void setPosition (Vector position)
 Set relative position.
void setRange (float range)
 Set range.
void setRollOff (float rollOff)
 Set roll-off factor.
void setSound (Sound sound)
 Set sound to play.
void setSpeakerType (SpeakerType type)
 Set speaker type.
void setVolume (float volume)
 Set volume.
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.

Detailed Description

Behavior instance.

Member Function Documentation

◆ createSpeaker()

Speaker Dragengine.Scenery.ECBehaviorPlaySound.Instance.createSpeaker ( )
protected

◆ dispose()

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

Dispose of composeable instance.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

Referenced by getVolume(), and setVolume().

◆ getBone()

String Dragengine.Scenery.ECBehaviorPlaySound.Instance.getBone ( )

Relative bone or null.

References pComponent, and pPlaySoundMatrix.

Referenced by getSound().

◆ getBoneIndex()

int Dragengine.Scenery.ECBehaviorPlaySound.Instance.getBoneIndex ( )

Relative bone index.

◆ getCollider()

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

Collider or null if not used.

References getSound(), getSpeakerType(), pSound, and pSpeakerType.

Referenced by setRollOff(), and updateBoneIndex().

◆ getComponent()

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

Component or null if not used.

References new(), pBoneIndex, and pECBehavior.

Referenced by getRollOff(), and setBone().

◆ getDistanceOffset()

float Dragengine.Scenery.ECBehaviorPlaySound.Instance.getDistanceOffset ( )

Distance offset for attenuation calculation.

Version
1.12

For use by distance sounds. Offsets the true distance to the sound source for attenuation calculation to make the sound appear coming from far away. Requires increasing the volume to compensate for the distance increased attenuation.

References Dragengine.Scenery.ECBehaviorPlaySound.getBehaviorTree(), Dragengine.Scenery.ECBehaviorPlaySound.getPrefix(), Dragengine.Scenery.ECBehaviorPlaySound.instance(), and pECBehavior.

Referenced by setSpeakerType().

◆ getECBehavior()

ECBehaviorPlaySound Dragengine.Scenery.ECBehaviorPlaySound.Instance.getECBehavior ( )

Behavior.

◆ getOrientation()

Quaternion Dragengine.Scenery.ECBehaviorPlaySound.Instance.getOrientation ( )

Relative orientation.

◆ getPlaySpeed()

float Dragengine.Scenery.ECBehaviorPlaySound.Instance.getPlaySpeed ( )

Play speed.

References new(), and setSound().

Referenced by setSpeakerType().

◆ getPosition()

Vector Dragengine.Scenery.ECBehaviorPlaySound.Instance.getPosition ( )

◆ getRange()

float Dragengine.Scenery.ECBehaviorPlaySound.Instance.getRange ( )

Range.

Referenced by getSpeakerType().

◆ getRollOff()

float Dragengine.Scenery.ECBehaviorPlaySound.Instance.getRollOff ( )

◆ getSound()

Sound Dragengine.Scenery.ECBehaviorPlaySound.Instance.getSound ( )

Sound to play.

References getBone(), pBone, pOrientation, and pPlaySoundMatrix.

Referenced by getCollider().

◆ getSpeakerType()

SpeakerType Dragengine.Scenery.ECBehaviorPlaySound.Instance.getSpeakerType ( )

Speaker type.

References getRange(), getRollOff(), getVolume(), pRange, pRollOff, and pVolume.

Referenced by getCollider().

◆ getTrigger()

ECBehaviorTriggered.Instance Dragengine.Scenery.ECBehaviorPlaySound.Instance.getTrigger ( )

◆ getVolume()

float Dragengine.Scenery.ECBehaviorPlaySound.Instance.getVolume ( )

Volume.

References dispose(), pCollider, and pTrigger.

Referenced by getSpeakerType().

◆ init()

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

Initialize element from stub.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

References pCollider, pComponent, pECBehavior, pSound, and pSpeakerType.

Referenced by setRange().

◆ new()

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

Create element.

References play().

Referenced by getComponent(), and getPlaySpeed().

◆ play()

Speaker Dragengine.Scenery.ECBehaviorPlaySound.Instance.play ( )

Play sound as one shot speaker.

1.16

Returns speaker added to game world or null if unable to play sound.

Referenced by new().

◆ positionSpeaker()

void Dragengine.Scenery.ECBehaviorPlaySound.Instance.positionSpeaker ( Speaker speaker)
protected

Position speaker.

If bone and collider is present speaker is attached.

References pBone, pBoneIndex, pPlaySoundMatrix, and pTrigger.

Referenced by setOrientation().

◆ setBone()

void Dragengine.Scenery.ECBehaviorPlaySound.Instance.setBone ( String bone)
protected

Set relative bone or null.

References getComponent(), pBoneIndex, and pComponent.

◆ setDistanceOffset()

void Dragengine.Scenery.ECBehaviorPlaySound.Instance.setDistanceOffset ( float distanceOffset)

Set distance offset for attenuation calculation.

Version
1.12

For use by distance sounds. Offsets the true distance to the sound source for attenuation calculation to make the sound appear coming from far away. Requires increasing the volume to compensate for the distance increased attenuation.

References createSpeaker().

Referenced by getPosition().

◆ setOrientation()

void Dragengine.Scenery.ECBehaviorPlaySound.Instance.setOrientation ( Quaternion orientation)
protected

Set relative orientation.

References positionSpeaker().

Referenced by updateBoneIndex().

◆ setPlaySpeed()

void Dragengine.Scenery.ECBehaviorPlaySound.Instance.setPlaySpeed ( float playSpeed)
protected

Set play speed.

References setRange(), setRollOff(), and setVolume().

Referenced by getPosition().

◆ setPosition()

void Dragengine.Scenery.ECBehaviorPlaySound.Instance.setPosition ( Vector position)
protected

Set relative position.

Referenced by updateBoneIndex().

◆ setRange()

void Dragengine.Scenery.ECBehaviorPlaySound.Instance.setRange ( float range)
protected

◆ setRollOff()

void Dragengine.Scenery.ECBehaviorPlaySound.Instance.setRollOff ( float rollOff)
protected

◆ setSound()

void Dragengine.Scenery.ECBehaviorPlaySound.Instance.setSound ( Sound sound)
protected

Set sound to play.

Referenced by getPlaySpeed().

◆ setSpeakerType()

void Dragengine.Scenery.ECBehaviorPlaySound.Instance.setSpeakerType ( SpeakerType type)
protected

◆ setVolume()

void Dragengine.Scenery.ECBehaviorPlaySound.Instance.setVolume ( float volume)
protected

Set volume.

References dispose(), and pComponent.

Referenced by setPlaySpeed().

◆ updateBoneIndex()

void Dragengine.Scenery.ECBehaviorPlaySound.Instance.updateBoneIndex ( )

Member Data Documentation

◆ pBone

String Dragengine.Scenery.ECBehaviorPlaySound.Instance.pBone

Referenced by getSound(), and positionSpeaker().

◆ pBoneIndex

int Dragengine.Scenery.ECBehaviorPlaySound.Instance.pBoneIndex

◆ pCollider

ECBehaviorCollider.Instance Dragengine.Scenery.ECBehaviorPlaySound.Instance.pCollider

◆ pComponent

ECBehaviorComponent.Instance Dragengine.Scenery.ECBehaviorPlaySound.Instance.pComponent

◆ pDistanceOffset

float Dragengine.Scenery.ECBehaviorPlaySound.Instance.pDistanceOffset

Referenced by createSpeaker(), and setSpeakerType().

◆ pECBehavior

ECBehaviorPlaySound Dragengine.Scenery.ECBehaviorPlaySound.Instance.pECBehavior

◆ pOrientation

Quaternion Dragengine.Scenery.ECBehaviorPlaySound.Instance.pOrientation

Referenced by createSpeaker(), and getSound().

◆ pPlaySoundMatrix

DMatrix Dragengine.Scenery.ECBehaviorPlaySound.Instance.pPlaySoundMatrix

Referenced by getBone(), getSound(), and positionSpeaker().

◆ pPlaySpeed

float Dragengine.Scenery.ECBehaviorPlaySound.Instance.pPlaySpeed

Referenced by createSpeaker(), and setSpeakerType().

◆ pPosition

Vector Dragengine.Scenery.ECBehaviorPlaySound.Instance.pPosition

Referenced by createSpeaker(), and setSpeakerType().

◆ pRange

float Dragengine.Scenery.ECBehaviorPlaySound.Instance.pRange

Referenced by createSpeaker(), and getSpeakerType().

◆ pRollOff

float Dragengine.Scenery.ECBehaviorPlaySound.Instance.pRollOff

Referenced by createSpeaker(), and getSpeakerType().

◆ pSound

Sound Dragengine.Scenery.ECBehaviorPlaySound.Instance.pSound

Referenced by getCollider(), and init().

◆ pSpeakerType

SpeakerType Dragengine.Scenery.ECBehaviorPlaySound.Instance.pSpeakerType

Referenced by getCollider(), and init().

◆ pTrigger

ECBehaviorTriggered.Instance Dragengine.Scenery.ECBehaviorPlaySound.Instance.pTrigger

◆ pVolume

float Dragengine.Scenery.ECBehaviorPlaySound.Instance.pVolume

Referenced by createSpeaker(), and getSpeakerType().


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