C# Class Sol.SoundSource

Inheritance: UnityEngine.MonoBehaviour
显示文件 Open project: Stumpstump/RoverGame Class Usage Examples

Public Properties

Property Type Description
PlayEvent System.Action
StopEvent System.Action
playOnEnable bool

Private Properties

Property Type Description
ChangeVolumeCoroutine IEnumerator
OnEnable void
OnVolumeChanged void
Update void

Public Methods

Method Description
Play ( ) : void
Play ( Sound sound, float fadeTime = 0f ) : void
SetVolumeTo ( float volume, float fadeTime, System callback = null ) : void
Stop ( float fadeTime = 0f ) : void

Private Methods

Method Description
ChangeVolumeCoroutine ( float from, float to, float time, System callback = null ) : IEnumerator
OnEnable ( ) : void
OnVolumeChanged ( float volume ) : void
Update ( ) : void

Method Details

Play() public method

public Play ( ) : void
return void

Play() public method

public Play ( Sound sound, float fadeTime = 0f ) : void
sound Sound
fadeTime float
return void

SetVolumeTo() public method

public SetVolumeTo ( float volume, float fadeTime, System callback = null ) : void
volume float
fadeTime float
callback System
return void

Stop() public method

public Stop ( float fadeTime = 0f ) : void
fadeTime float
return void

Property Details

PlayEvent public_oe property

public System.Action PlayEvent
return System.Action

StopEvent public_oe property

public System.Action StopEvent
return System.Action

playOnEnable public_oe property

public bool playOnEnable
return bool