|
Drag[en]gine Script Module DragonScript 1.32.1
|
GameWorld Behavior adding support for one-shot speakers. More...
Public Member Functions | |
| void | addSpeaker (Speaker speaker) |
| Add one shot speaker. | |
| void | dispose () |
| Dispose of behavior. | |
| LayerMask | getLayerMask () |
| Layer mask to use for one shot speaker. | |
| Speaker | getSpeakerAt (int index) |
| Speaker at index. | |
| int | getSpeakerCount () |
| Count of speakers. | |
| GWBehaviorOneShotSpeaker | new (GameWorld gameWorld) |
| Create element. | |
| void | playSoundOnce (Sound sound, DVector position, float volume, float range) |
| Play sound once. | |
| void | playSoundOnce (Sound sound, DVector position, Quaternion orientation, float volume, float range) |
| Play sound once. | |
| void | playSoundOnce (Sound sound, Element element, float volume, float range) |
| Play sound once. | |
| void | playSynthesizerOnce (SynthesizerInstance synthesizer, DVector position, float volume, float range) |
| Play synthesizer instance once. | |
| void | playSynthesizerOnce (SynthesizerInstance synthesizer, DVector position, Quaternion orientation, float volume, float range) |
| Play synthesizer instance once. | |
| void | playSynthesizerOnce (SynthesizerInstance synthesizer, Element element, float volume, float range) |
| Play synthesizer instance once. | |
| void | removeFinishedSpeakers () |
| Remove one shot speakers that finished playing. | |
| void | setLayerMask (LayerMask layerMask) |
| Set layer mask to use for one shot speaker. | |
Public Member Functions inherited from Dragengine.Scenery.DefaultGWBehavior | |
| String | getBehaviorID () |
| Unique identifier of behavior. | |
| GameWorld | getGameWorld () |
| Game world this behavior belongs to. | |
| String | getID () |
| Identifier. | |
| void | init (StubGameWorld stub) |
| Initialize game world from stub. | |
| void | loadSupportedData (String identifier, PersistencyEnvironment env, FileReader reader) |
| Load data of another behavior. | |
| DefaultGWBehavior | new (GameWorld gameWorld, String id) |
| Create default behavior. | |
| void | postThink (float elapsed) |
| Post thinking after physics processing is finished. | |
| void | readFromFile (PersistencyEnvironment env, FileReader reader) |
| Read from file. | |
| bool | requiresPersistency () |
| Behavior requires readFromFile() and writeToFile() to be called. | |
| bool | requiresThink () |
| Behavior instance requires update(), think() and postThink() to be called. | |
| bool | supportsBehaviorID (String identifier) |
| Behavior supports loading data of another behavior. | |
| void | think (float elapsed) |
| Think about what to do for the next frame update. | |
| void | update (float elapsed) |
| Frame update. | |
| void | writeToFile (PersistencyEnvironment env, FileWriter writer) |
| Write to file. | |
Static Public Member Functions | |
| static GWBehaviorOneShotSpeaker | getBehaviorIn (GameWorld gameWorld) |
| Get behavior in game world or null if absent. | |
Public Attributes | |
| LayerMask | pLayerMask |
| Array | pSpeakers |
Additional Inherited Members | |
Protected Member Functions inherited from Dragengine.Scenery.DefaultGWBehavior | |
| void | setBehaviorID (String identifier) |
| Set behavior identifier. | |
| void | setRequiresPersistency (bool required) |
| Set if behavior requires readFromFile() and writeToFile() to be called. | |
| void | setRequiresThink (bool required) |
| Set if behavior instance requires update(), think() and postThink() to be called. | |
| void | useClassNameAsBehaviorID () |
| Set behavior identifier to "<class-name>:<identifier>". | |
| void | useFullyQualifiedClassNameAsBehaviorID () |
| Set behavior identifier to "<fully-qualified-class-name>:<identifier>". | |
GameWorld Behavior adding support for one-shot speakers.
One shot speakers are deploy-and-forget type speakers playing a sound or synthesizer once then self-destroy.
This behavior can be present only once in a GameWorld.
| void Dragengine.Scenery.GWBehaviorOneShotSpeaker.addSpeaker | ( | Speaker | speaker | ) |
Add one shot speaker.
Plays a short sound once and will be deleted once finished playing.
| void Dragengine.Scenery.GWBehaviorOneShotSpeaker.dispose | ( | ) |
Dispose of behavior.
Reimplemented from Dragengine.Scenery.DefaultGWBehavior.
|
static |
Get behavior in game world or null if absent.
Use this method to check if GameWorld contains behavior of type GWBehaviorOneShotSpeaker.
| LayerMask Dragengine.Scenery.GWBehaviorOneShotSpeaker.getLayerMask | ( | ) |
Layer mask to use for one shot speaker.
| Speaker Dragengine.Scenery.GWBehaviorOneShotSpeaker.getSpeakerAt | ( | int | index | ) |
Speaker at index.
| int Dragengine.Scenery.GWBehaviorOneShotSpeaker.getSpeakerCount | ( | ) |
Count of speakers.
| GWBehaviorOneShotSpeaker Dragengine.Scenery.GWBehaviorOneShotSpeaker.new | ( | GameWorld | gameWorld | ) |
Create element.
Reimplemented from Dragengine.Scenery.DefaultGWBehavior.
| void Dragengine.Scenery.GWBehaviorOneShotSpeaker.playSoundOnce | ( | Sound | sound, |
| DVector | position, | ||
| float | volume, | ||
| float | range | ||
| ) |
Play sound once.
Create speaker with sound and parameters playing it once. Does nothing if sound is null.
| void Dragengine.Scenery.GWBehaviorOneShotSpeaker.playSoundOnce | ( | Sound | sound, |
| DVector | position, | ||
| Quaternion | orientation, | ||
| float | volume, | ||
| float | range | ||
| ) |
Play sound once.
Create speaker with sound and parameters playing it once. Does nothing if sound is null.
| void Dragengine.Scenery.GWBehaviorOneShotSpeaker.playSoundOnce | ( | Sound | sound, |
| Element | element, | ||
| float | volume, | ||
| float | range | ||
| ) |
Play sound once.
Create speaker with sound and parameters playing it once. Does nothing if sound is null.
| void Dragengine.Scenery.GWBehaviorOneShotSpeaker.playSynthesizerOnce | ( | SynthesizerInstance | synthesizer, |
| DVector | position, | ||
| float | volume, | ||
| float | range | ||
| ) |
Play synthesizer instance once.
Create speaker with synthesizer instance and parameters playing it once. Does nothing if synthesizer is null.
| void Dragengine.Scenery.GWBehaviorOneShotSpeaker.playSynthesizerOnce | ( | SynthesizerInstance | synthesizer, |
| DVector | position, | ||
| Quaternion | orientation, | ||
| float | volume, | ||
| float | range | ||
| ) |
Play synthesizer instance once.
Create speaker with synthesizer instance and parameters playing it once. Does nothing if synthesizer is null.
| void Dragengine.Scenery.GWBehaviorOneShotSpeaker.playSynthesizerOnce | ( | SynthesizerInstance | synthesizer, |
| Element | element, | ||
| float | volume, | ||
| float | range | ||
| ) |
Play synthesizer instance once.
Create speaker with synthesizer instance and parameters playing it once. Does nothing if synthesizer is null.
| void Dragengine.Scenery.GWBehaviorOneShotSpeaker.removeFinishedSpeakers | ( | ) |
Remove one shot speakers that finished playing.
| void Dragengine.Scenery.GWBehaviorOneShotSpeaker.setLayerMask | ( | LayerMask | layerMask | ) |
Set layer mask to use for one shot speaker.
| LayerMask Dragengine.Scenery.GWBehaviorOneShotSpeaker.pLayerMask |
| Array Dragengine.Scenery.GWBehaviorOneShotSpeaker.pSpeakers |