public InterruptFeedback() { InitializeComponent(); myMistake = "25"; myInterruption = InterruptionType.reportButton; intThreshold = 40000; }
public void PlaySFX(AudioClip soundClip, float volume, InterruptionType interruptType, List <string> alsoInterrupt, bool loop = false) { GDebug.Log("try play " + soundClip.name + " with volume " + volume + " interrupt " + interruptType, this, LogCategory.SOUND_MANAGER); if (!MuteAllSound && !MuteSfx) { switch (interruptType) { case InterruptionType.DontCare: Play(soundClip, volume, loop); break; case InterruptionType.DontInterrupt: if (!SFXIsPlaying(soundClip)) { Play(soundClip, volume, loop); } break; case InterruptionType.Interrupt: if (SFXIsPlaying(soundClip)) { GetPlayingSFXSource(soundClip).Stop(); StopPlayingSoundList(alsoInterrupt, soundClip.name); Play(soundClip, volume, loop); } else { if (soundClip != null) { StopPlayingSoundList(alsoInterrupt, soundClip.name); } Play(soundClip, volume, loop); } break; case InterruptionType.DontInterruptButInterruptOthers: if (!SFXIsPlaying(soundClip)) { Play(soundClip, volume, loop); } StopPlayingSoundList(alsoInterrupt, soundClip.name); break; } } }
public void PlaySFX(string clipName, float volume, InterruptionType interruptType, string[] alsoInterrupt, bool loop = false) { if (string.IsNullOrEmpty(clipName)) { return; } AudioClip clip = SFXPlaylist.FindByName(clipName); if (clip == SFXPlaylist.DefaultClip) { clip = SFXPlaylist.FindClosestByName(clipName); PlaySFX(clip, volume, interruptType, new List <string>(alsoInterrupt), loop); } else { PlaySFX(clip, volume, interruptType, new List <string>(alsoInterrupt), loop); } }
public void PlaySFX(AudioClip soundClip, float volume, InterruptionType interruptType, string[] alsoInterrupt) { PlaySFX(soundClip, volume, InterruptionType.DontCare, new List <string>(alsoInterrupt)); }
public void PlaySFX(string clipName, float volume, InterruptionType interruptType) { PlaySFX(clipName, volume, interruptType, new string[0]); }
public ReportFeedback() { InitializeComponent(); myMistake = "25"; myInterruption = InterruptionType.reportButton; }
public Interruption(string name, InterruptionType type) { Name = name; Type = type; Tags = new List <InterruptionTag>(); }
public Interruption(string name, InterruptionType type) { Name = name; Type = type; Tags = new List<InterruptionTag>(); }
public InterruptFeedback() { InitializeComponent(); myMistake = "25"; myInterruption = InterruptionType.reportButton; }