public static void emit(SoundManagerType emt) { if (onEvent != null) { onEvent(emt); } }
public static void emit(SoundManagerType emt, GameObject emiter) { if (onEvent != null) { onEvent(emt, emiter); } }
void Effect(SoundManagerType emt, GameObject emiter = null) { switch (emt) { case SoundManagerType.CANON: tour = emiter.GetComponent <AudioSource>(); tour.Stop(); tour.clip = canonClip; tour.Play(); break; case SoundManagerType.RAFALE: tour = emiter.GetComponent <AudioSource>(); tour.Stop(); tour.clip = rafaleClip; tour.Play(); break; case SoundManagerType.SNIPER: tour = emiter.GetComponent <AudioSource>(); tour.Stop(); tour.clip = sniperClip; tour.Play(); break; case SoundManagerType.NEWWAVE: newWaveSource.Stop(); newWaveSource.clip = newWaveClip; newWaveSource.Play(); break; case SoundManagerType.INTERFACE: interfaceSource.Stop(); interfaceSource.clip = interfaceClip; interfaceSource.Play(); break; case SoundManagerType.FUSION: newWaveSource.Stop(); newWaveSource.clip = fusion; newWaveSource.Play(); break; } }
public static string GetPath(SoundManagerType type) { string str; switch (type) { case SoundManagerType.Main: str = "Main"; break; case SoundManagerType.Menu: str = "Menu"; break; case SoundManagerType.Character: str = "Character"; break; default: str = SceneManager.GetActiveScene().name; break; } return("Audio/" + str + "Sounds.txt"); }
public void Play(SoundManagerType emt) { switch (emt) { case SoundManagerType.BumpBumper: Source[5].Stop(); Source[5].clip = Sound[0]; Source[5].Play(); break; case SoundManagerType.BumpPlayer: Source[5].Stop(); Source[5].clip = Sound[1]; Source[5].Play(); break; case SoundManagerType.BumpWall: Source[5].Stop(); Source[5].clip = Sound[2]; Source[5].Play(); break; case SoundManagerType.DamageBear: Source[2].Stop(); Source[2].clip = BearRoar[0]; Source[2].Play(); break; case SoundManagerType.DamageLion: Source[1].Stop(); Source[1].clip = LionRoar[0]; Source[1].Play(); break; case SoundManagerType.DoubleTapBear: Source[2].Stop(); Source[2].clip = Music[0]; Source[2].Play(); break; case SoundManagerType.DoubleTapLion: Source[1].Stop(); Source[1].clip = LionRoar[1]; Source[1].Play(); break; case SoundManagerType.MainTheme: Source[0].Stop(); Source[0].clip = Music[0]; Source[0].Play(); break; case SoundManagerType.MenuTheme: Source[0].Stop(); Source[0].clip = Music[1]; Source[0].Play(); break; case SoundManagerType.NextTurn: Source[7].Stop(); Source[7].clip = Sound[3]; Source[7].Play(); break; case SoundManagerType.PlacePlayer: Source[10].Stop(); Source[10].clip = Sound[4]; Source[10].Play(); break; case SoundManagerType.ReleaseMush: Source[8].Stop(); Source[8].clip = Sound[5]; Source[8].Play(); break; case SoundManagerType.Shield: Source[9].Stop(); Source[9].clip = Sound[6]; Source[9].Play(); break; case SoundManagerType.SlingReleaseBear: Source[2].Stop(); Source[2].clip = BearRoar[2]; Source[2].Play(); break; case SoundManagerType.SlingReleaseLion: Source[1].Stop(); Source[1].clip = LionRoar[2]; Source[1].Play(); break; case SoundManagerType.SlingScale: Source[10].Stop(); Source[10].clip = Sound[7]; Source[10].Play(); break; case SoundManagerType.SpellStop: Source[4].Stop(); Source[4].clip = Sound[9]; Source[4].Play(); break; case SoundManagerType.SpellAcceleration: Source[4].Stop(); Source[4].clip = Sound[8]; Source[4].Play(); break; case SoundManagerType.TakeMush: Source[8].Stop(); Source[8].clip = Sound[10]; Source[8].Play(); break; case SoundManagerType.Transition: Source[5].Stop(); Source[5].clip = Sound[11]; Source[5].Play(); break; case SoundManagerType.Validation: Source[5].Stop(); Source[5].clip = Sound[12]; Source[5].Play(); break; case SoundManagerType.Victory: Source[5].Stop(); Source[5].clip = Sound[15]; Source[5].Play(); break; case SoundManagerType.CrashGlass: Source[5].Stop(); Source[5].clip = Sound[13]; Source[5].Play(); break; case SoundManagerType.PhotoClick: Source[5].Stop(); Source[5].clip = Sound[14]; Source[5].Play(); break; } }
public void Play(SoundManagerType emt) { switch (emt) { case SoundManagerType.ABSOLUMENT: Source[2].Stop(); Source[2].clip = Voice[0]; Source[2].Play(); break; case SoundManagerType.BIENJOUE: Source[2].Stop(); Source[2].clip = Voice[1]; Source[2].Play(); break; case SoundManagerType.BONBOULOT: Source[2].Stop(); Source[2].clip = Voice[2]; Source[2].Play(); break; case SoundManagerType.BRAVO: Source[2].Stop(); Source[2].clip = Voice[3]; Source[2].Play(); break; case SoundManagerType.EXCELLENT: Source[2].Stop(); Source[2].clip = Voice[4]; Source[2].Play(); break; case SoundManagerType.SUPER: Source[2].Stop(); Source[2].clip = Voice[5]; Source[2].Play(); break; case SoundManagerType.AIEAIEAIE1: Source[2].Stop(); Source[2].clip = Voice[6]; Source[2].Play(); break; case SoundManagerType.AIEAIEAIE2: Source[2].Stop(); Source[2].clip = Voice[7]; Source[2].Play(); break; case SoundManagerType.AIEAIEAIE3: Source[2].Stop(); Source[2].clip = Voice[8]; Source[2].Play(); break; case SoundManagerType.CENESTPASCA: Source[2].Stop(); Source[2].clip = Voice[9]; Source[2].Play(); break; case SoundManagerType.NONNONNON1: Source[2].Stop(); Source[2].clip = Voice[10]; Source[2].Play(); break; case SoundManagerType.NONNONNON2: Source[2].Stop(); Source[2].clip = Voice[11]; Source[2].Play(); break; case SoundManagerType.PERDU: Source[2].Stop(); Source[2].clip = Voice[12]; Source[2].Play(); break; case SoundManagerType.PRESQUE: Source[2].Stop(); Source[2].clip = Voice[13]; Source[2].Play(); break; case SoundManagerType.TUFERASMIEUX: Source[2].Stop(); Source[2].clip = Voice[14]; Source[2].Play(); break; case SoundManagerType.RANDOMPOSITIVE: Source[2].Stop(); Source[2].clip = Voice[Random.Range(0, 6)]; Source[2].Play(); break; case SoundManagerType.RANDOMNEGATIVE: Source[2].Stop(); Source[2].clip = Voice[Random.Range(6, 14)]; Source[2].Play(); break; case SoundManagerType.TURMEL00: Source[2].Stop(); Source[2].clip = Voice[15]; Source[2].Play(); Debug.Log("Turmel 00"); break; case SoundManagerType.TURMEL01: Source[2].Stop(); Source[2].clip = Voice[16]; Source[2].Play(); break; case SoundManagerType.TURMEL02: Source[2].Stop(); Source[2].clip = Voice[17]; Source[2].Play(); break; case SoundManagerType.TURMEL03: Source[2].Stop(); Source[2].clip = Voice[18]; Source[2].Play(); break; case SoundManagerType.TURMEL04: Source[2].Stop(); Source[2].clip = Voice[19]; Source[2].Play(); break; case SoundManagerType.TURMEL05: Source[2].Stop(); Source[2].clip = Voice[20]; Source[2].Play(); break; case SoundManagerType.TURMEL06: Source[2].Stop(); Source[2].clip = Voice[21]; Source[2].Play(); break; case SoundManagerType.TURMEL07: Source[2].Stop(); Source[2].clip = Voice[22]; Source[2].Play(); break; case SoundManagerType.TURMEL08: Source[2].Stop(); Source[2].clip = Voice[23]; Source[2].Play(); break; case SoundManagerType.TURMEL09: Source[2].Stop(); Source[2].clip = Voice[24]; Source[2].Play(); break; case SoundManagerType.TURMEL10: Source[2].Stop(); Source[2].clip = Voice[25]; Source[2].Play(); break; case SoundManagerType.MISHOOOO1: Source[2].Stop(); Source[2].clip = Voice[26]; Source[2].Play(); break; case SoundManagerType.MISHOOOO2: Source[2].Stop(); Source[2].clip = Voice[27]; Source[2].Play(); break; } }