private void Update() { if (Input.GetKeyDown(KeyCode.A)) { Debug.Log("FMOD event exist - " + FMOD_Debug.CheckFmodEvent(eventPath)); } }
public void FartSound() { if (fmodOn) { string eventPath = "event:/SFX/Panties_fart"; if (FMOD_Debug.CheckFmodEvent(eventPath)) { RuntimeManager.PlayOneShot(eventPath, transform.position); } } }
public void DeathSound() { if (fmodOn) { string eventPath = "event:/SFX/" + _type.ToString() + "_death"; if (FMOD_Debug.CheckFmodEvent(eventPath)) { RuntimeManager.PlayOneShot(eventPath, transform.position); } } }
public void ClickSound() { if (PlayerPrefs.GetInt("FmodOn") > 0) { string eventPath = "event:/SFX/MenuButtonsClick"; if (FMOD_Debug.CheckFmodEvent(eventPath)) { RuntimeManager.PlayOneShot(eventPath, transform.position); } } }
public void BumpSound() { if (fmodOn) { string eventhPath = "event:/SFX/bump"; if (FMOD_Debug.CheckFmodEvent(eventhPath)) { RuntimeManager.PlayOneShot(eventhPath, transform.position); } } }
public IEnumerator goRanking(float time) { yield return(new WaitForSeconds(1.5f)); for (int i = 0; i < rank; i++) { if (rank < 10) { yield return(new WaitForSeconds(time)); heads.transform.localPosition += new Vector3(0f, 30f, 0f); string eventPath = "event:/SFX/RankingButtons"; if (PlayerPrefs.GetInt("FmodOn") > 0 && FMOD_Debug.CheckFmodEvent(eventPath)) { RuntimeManager.PlayOneShot(eventPath, transform.position); } } } yield return(new WaitForSeconds(time)); _texts[rank].text = "<b>" + _texts[rank].text; if (rank < 4) { heads.GetComponentInChildren <Animator>().SetBool("bad", true); string eventPath = "event:/SFX/RankBad"; if (PlayerPrefs.GetInt("FmodOn") > 0 && FMOD_Debug.CheckFmodEvent(eventPath)) { RuntimeManager.PlayOneShot(eventPath, transform.position); } } else if (rank > 8) { string eventPath = "event:/SFX/RankAmazing"; if (PlayerPrefs.GetInt("FmodOn") > 0 && FMOD_Debug.CheckFmodEvent(eventPath)) { RuntimeManager.PlayOneShot(eventPath, transform.position); } heads.GetComponentInChildren <Animator>().SetBool("great", true); } else { heads.GetComponentInChildren <Animator>().SetBool("great", true); string eventPath = "event:/SFX/RankGood"; if (PlayerPrefs.GetInt("FmodOn") > 0 && FMOD_Debug.CheckFmodEvent(eventPath)) { RuntimeManager.PlayOneShot(eventPath, transform.position); } } }
private void Awake() { if (PlayerPrefs.GetInt("FmodOn") > 0) { fmodOn = true; } _emitter = GetComponent <StudioEventEmitter>(); if (fmodOn) { _emitter.SetParameter("speed", 0f); string movementPath = "event:/SFX/Player_movement"; if (FMOD_Debug.CheckFmodEvent(movementPath)) { _emitter.Event = movementPath; _emitter.Play(); } } }
public void ComplainSound(bool fish) { if (fmodOn) { if (fish) { string eventhPath = "event:/SFX/Fish_complain"; if (FMOD_Debug.CheckFmodEvent(eventhPath)) { RuntimeManager.PlayOneShot(eventhPath, transform.position); } } else { string eventhPath = "event:/SFX/Wolf_complain"; if (FMOD_Debug.CheckFmodEvent(eventhPath)) { RuntimeManager.PlayOneShot(eventhPath, transform.position); } } } }
private void Awake() { if (PlayerPrefs.GetInt("FmodOn") > 0) { fmodOn = true; } if (GetComponent <PatrolCollectible>() != null) { _type = GetComponent <PatrolCollectible>().Type; } else { _type = GetComponent <BaseCollectible>().Type; } if (GetComponent <StudioEventEmitter>() == null) { _emitter = gameObject.AddComponent(typeof(StudioEventEmitter)) as StudioEventEmitter; } else { _emitter = GetComponent <StudioEventEmitter>(); } if (fmodOn) { string idleSoundPath = "event:/SFX/" + _type.ToString() + "_idle"; if (FMOD_Debug.CheckFmodEvent(idleSoundPath)) { _emitter.Event = idleSoundPath; _emitter.Play(); } } }