YaSoundProviderComponent¶
YaSoundProviderComponent controls the sound attached to the object.
Functions¶
number GetClipLength()
|
| Returns the length of the sound clip. |
void SetClipLength(number length)
|
| Sets the length of the sound clip. |
void SetVolume(number volume)
|
| Sets the volume of the sound clip, which can be between 0 and 1. |
number GetVolume()
|
| Gets the volume of the sound clip, which can be between 0 and 1. |
void ChangeSong(string musicID)
|
Plays the song of musicID
|
bool IsPlaying()
|
| Returns true if the sound clip is playing. |
void Play()
|
| Countinues to play. |
void Replay()
|
| Replays the sound from the beginning. |
void Pause()
|
| Pauses the play of the sound clip. |
void SetThreeDimensionalSound((bool isThreeDimension))
|
| Determines whether the sound effect as 3D. |
void SetMinMaxDistance(number minValue,number maxValue)
|
Sets the minimum distance minValue beyond which the sound volume starts to attenuate and the maximum distance maxValue beyong which the sound can't be heard.
|
void SetSoundLoop (bool Looping)
|
| Deterimines if the sound plays in a loop mode. |
bool GetSoundLoop()
|
| Returns true if the sound plays in a loop mode. |