Drag[en]gine Script Module DragonScript
1.23
|
Behavior instance. More...
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... | |
Behavior instance.
|
protected |
Create speaker.
Reimplemented in Dragengine.Scenery.ECBehaviorPlaySoundRandom.Instance.
void Dragengine.Scenery.ECBehaviorPlaySound.Instance.dispose | ( | ) |
Dispose of composeable instance.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
String Dragengine.Scenery.ECBehaviorPlaySound.Instance.getBone | ( | ) |
Relative bone or null.
int Dragengine.Scenery.ECBehaviorPlaySound.Instance.getBoneIndex | ( | ) |
Relative bone index.
ECBehaviorCollider.Instance Dragengine.Scenery.ECBehaviorPlaySound.Instance.getCollider | ( | ) |
Collider or null if not used.
ECBehaviorComponent.Instance Dragengine.Scenery.ECBehaviorPlaySound.Instance.getComponent | ( | ) |
Component or null if not used.
float Dragengine.Scenery.ECBehaviorPlaySound.Instance.getDistanceOffset | ( | ) |
Distance offset for attenuation calculation.
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.
ECBehaviorPlaySound Dragengine.Scenery.ECBehaviorPlaySound.Instance.getECBehavior | ( | ) |
Behavior.
Quaternion Dragengine.Scenery.ECBehaviorPlaySound.Instance.getOrientation | ( | ) |
Relative orientation.
float Dragengine.Scenery.ECBehaviorPlaySound.Instance.getPlaySpeed | ( | ) |
Play speed.
Vector Dragengine.Scenery.ECBehaviorPlaySound.Instance.getPosition | ( | ) |
Relative position.
float Dragengine.Scenery.ECBehaviorPlaySound.Instance.getRange | ( | ) |
Range.
float Dragengine.Scenery.ECBehaviorPlaySound.Instance.getRollOff | ( | ) |
Roll-off factor.
SpeakerType Dragengine.Scenery.ECBehaviorPlaySound.Instance.getSpeakerType | ( | ) |
Speaker type.
ECBehaviorTriggered.Instance Dragengine.Scenery.ECBehaviorPlaySound.Instance.getTrigger | ( | ) |
Trigger play or null if not used.
float Dragengine.Scenery.ECBehaviorPlaySound.Instance.getVolume | ( | ) |
Volume.
void Dragengine.Scenery.ECBehaviorPlaySound.Instance.init | ( | StubElement | stub | ) |
Initialize element from stub.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
Instance Dragengine.Scenery.ECBehaviorPlaySound.Instance.new | ( | ECBehaviorPlaySound | ecbehavior, |
BehaviorElement | element | ||
) |
Create element.
Speaker Dragengine.Scenery.ECBehaviorPlaySound.Instance.play | ( | ) |
Play sound as one shot speaker.
Returns speaker added to game world or null if unable to play sound.
|
protected |
Position speaker.
If bone and collider is present speaker is attached.
|
protected |
Set relative bone or null.
void Dragengine.Scenery.ECBehaviorPlaySound.Instance.setDistanceOffset | ( | float | distanceOffset | ) |
Set distance offset for attenuation calculation.
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.
|
protected |
Set relative orientation.
|
protected |
Set play speed.
|
protected |
Set relative position.
|
protected |
Set range.
|
protected |
Set roll-off factor.
|
protected |
Set sound to play.
|
protected |
Set speaker type.
|
protected |
Set volume.
void Dragengine.Scenery.ECBehaviorPlaySound.Instance.updateBoneIndex | ( | ) |
Update bone index.