diff --git a/Assets/Fungus/Audio/Editor/ControlAudioEditor.cs b/Assets/Fungus/Audio/Editor/ControlAudioEditor.cs index 95cbe4f4..9dea4a17 100644 --- a/Assets/Fungus/Audio/Editor/ControlAudioEditor.cs +++ b/Assets/Fungus/Audio/Editor/ControlAudioEditor.cs @@ -39,11 +39,11 @@ namespace Fungus EditorGUILayout.PropertyField(controlProp); EditorGUILayout.PropertyField(audioSourceProp); string fadeLabel = "Fade Out Duration"; - if (t.Control != ControlAudio.controlType.StopLoop && t.Control != ControlAudio.controlType.PauseLoop) + if (t.Control != ControlAudio.ControlType.StopLoop && t.Control != ControlAudio.ControlType.PauseLoop) { fadeLabel = "Fade In Duration"; string volumeLabel = "End Volume"; - if (t.Control == ControlAudio.controlType.ChangeVolume) + if (t.Control == ControlAudio.ControlType.ChangeVolume) { fadeLabel = "Fade Duration"; volumeLabel = "New Volume"; diff --git a/Assets/Fungus/Audio/Scripts/Commands/ControlAudio.cs b/Assets/Fungus/Audio/Scripts/Commands/ControlAudio.cs index 4c6525b9..ed9acd91 100644 --- a/Assets/Fungus/Audio/Scripts/Commands/ControlAudio.cs +++ b/Assets/Fungus/Audio/Scripts/Commands/ControlAudio.cs @@ -16,7 +16,7 @@ namespace Fungus [ExecuteInEditMode] public class ControlAudio : Command { - public enum controlType + public enum ControlType { PlayOnce, PlayLoop, @@ -26,8 +26,8 @@ namespace Fungus } [Tooltip("What to do to audio")] - [SerializeField] protected controlType control; - public virtual controlType Control { get { return control; } } + [SerializeField] protected ControlType control; + public virtual ControlType Control { get { return control; } } [Tooltip("Audio clip to play")] [SerializeField] protected AudioSourceData _audioSource; @@ -54,28 +54,28 @@ namespace Fungus return; } - if (control != controlType.ChangeVolume) + if (control != ControlType.ChangeVolume) { _audioSource.Value.volume = endVolume; } switch(control) { - case controlType.PlayOnce: + case ControlType.PlayOnce: StopAudioWithSameTag(); PlayOnce(); break; - case controlType.PlayLoop: + case ControlType.PlayLoop: StopAudioWithSameTag(); PlayLoop(); break; - case controlType.PauseLoop: + case ControlType.PauseLoop: PauseLoop(); break; - case controlType.StopLoop: + case ControlType.StopLoop: StopLoop(_audioSource.Value); break; - case controlType.ChangeVolume: + case ControlType.ChangeVolume: ChangeVolume(); break; } @@ -255,11 +255,11 @@ namespace Fungus if (fadeDuration > 0) { fadeType = " Fade out"; - if (control != controlType.StopLoop) + if (control != ControlType.StopLoop) { fadeType = " Fade in volume to " + endVolume; } - if (control == controlType.ChangeVolume) + if (control == ControlType.ChangeVolume) { fadeType = " to " + endVolume; }