C# Class FadingAudioSource, kaijurising

Inheritance: MonoBehaviour
Afficher le fichier Open project: Moehammered/kaijurising Class Usage Examples

Méthodes publiques

Свойство Type Description
FadeOutThreshold float
FadeSpeed float

Méthodes publiques

Méthode Description
Fade ( AudioClip clip, float volume, bool loop ) : void

If the audio source is enabled and playing, fades out the current clip and fades in the specified one, after. If the audio source is enabled and not playing, fades in the specified clip immediately. If the audio source is not enalbed, fades in the specified clip as soon as it gets enabled.

Play ( ) : void

Continues fading in the current audio clip.

Stop ( ) : void

Stop playing the current audio clip immediately.

Private Methods

Méthode Description
Awake ( ) : void
FadeToNextClip ( ) : void
OnDisable ( ) : void
OnEnable ( ) : void
Update ( ) : void

Method Details

Fade() public méthode

If the audio source is enabled and playing, fades out the current clip and fades in the specified one, after. If the audio source is enabled and not playing, fades in the specified clip immediately. If the audio source is not enalbed, fades in the specified clip as soon as it gets enabled.
public Fade ( AudioClip clip, float volume, bool loop ) : void
clip UnityEngine.AudioClip Clip to fade in.
volume float Volume to fade to.
loop bool Whether to loop the new clip, or not.
Résultat void

Play() public méthode

Continues fading in the current audio clip.
public Play ( ) : void
Résultat void

Stop() public méthode

Stop playing the current audio clip immediately.
public Stop ( ) : void
Résultat void

Property Details

FadeOutThreshold public_oe property

Volume to end the previous clip at.
public float FadeOutThreshold
Résultat float

FadeSpeed public_oe property

Volume change per second when fading.
public float FadeSpeed
Résultat float