public void pas() { int indice = Random.Range(0, se.nbClips()); float volume = Random.Range(minVolume, maxVolume); float pitch = Random.Range(minPitch, maxPitch); se.playOneShot(indice, volume, pitch); }
private void CheckAnimationToPlaySound() { if (anim.GetCurrentAnimatorStateInfo(0).IsName("SpikesUp1") && SonPicPrepare && SonPicPrepareReplay) { SonPicPrepareReplay = false; se.playOneShot(Preparation); } if (anim.GetCurrentAnimatorStateInfo(0).IsName("SpikesUp2") && SonPicSortie && SonPicSortieReplay) { SonPicSortieReplay = false; se.playOneShot(Sortie); } if (anim.GetCurrentAnimatorStateInfo(0).IsName("SpikesDown") && SonPicRange && SonPicRangeReplay) { SonPicRangeReplay = false; se.playOneShot(Ranger); } }
public void ParticulePlay(EnumArmes armeActuel, Vector3 hitPoint, bool TouchMob) { switch (armeActuel) { case EnumArmes.VIDE: break; case EnumArmes.POELE: break; case EnumArmes.PAIN: break; case EnumArmes.PIED_LIT: if (!TouchMob) { Instantiate(ParticuleWall[0], new Vector3(hitPoint.x, hitPoint.y + 0.5f, hitPoint.z), Quaternion.identity); soundGenerator.playOneShot(SoundParticuleWall[0], 0.3f); } break; case EnumArmes.CHANDELIER: break; case EnumArmes.PELLE: break; case EnumArmes.BAGUETTE_MAGIQUE: break; } if (TouchMob) { Instantiate(ParticuleMobHurt[0], new Vector3(hitPoint.x, hitPoint.y + 0.5f, hitPoint.z), Quaternion.identity); soundGenerator.playOneShot(SoundParticuleMobHurt[0], 0.3f); } }
public void ChangeButton() { se.playOneShot(TicSound, 0.5f); }
void Start() { se = GetComponent <SoundEntity>(); se.playOneShot(0); }