Drag[en]gine Script Module DragonScript  1.23
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  PlayListener
 Trigger listener to play soubd. More...
 

Public Member Functions

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

Protected Member Functions

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

◆ createSpeaker()

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

Create speaker.

Reimplemented in Dragengine.Scenery.ECBehaviorPlaySoundRandom.Instance.

◆ dispose()

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

Dispose of composeable instance.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ getBone()

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

Relative bone or null.

◆ getBoneIndex()

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

Relative bone index.

◆ getCollider()

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

Collider or null if not used.

◆ getComponent()

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

Component or null if not used.

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

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

◆ getPosition()

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

Relative position.

◆ getRange()

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

Range.

◆ getRollOff()

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

Roll-off factor.

◆ getSound()

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

Sound to play.

◆ getSpeakerType()

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

Speaker type.

◆ getTrigger()

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

Trigger play or null if not used.

◆ getVolume()

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

Volume.

◆ init()

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

Initialize element from stub.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ new()

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

Create element.

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

◆ positionSpeaker()

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

Position speaker.

If bone and collider is present speaker is attached.

◆ setBone()

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

Set relative bone or null.

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

◆ setOrientation()

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

Set relative orientation.

◆ setPlaySpeed()

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

Set play speed.

◆ setPosition()

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

Set relative position.

◆ setRange()

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

Set range.

◆ setRollOff()

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

Set roll-off factor.

◆ setSound()

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

Set sound to play.

◆ setSpeakerType()

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

Set speaker type.

◆ setVolume()

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

Set volume.

◆ updateBoneIndex()

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

Update bone index.


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