public getBus ( string path, |
||
path | string | |
bus | ||
return | RESULT |
void Start() { FMOD.Studio.System system = FMOD_StudioSystem.instance.System; FMOD.RESULT result = system.getBus("bus:/Music", out musicBus); Debug.Log("FMOD music bus: " + result); result = system.getBus("bus:/Game", out soundBus); Debug.Log("FMOD sound bus: " + result); music.background.instance = FMOD_StudioSystem.instance.GetEvent(music.background.song); music.background.instance.getParameter("Death", out music.background.param); StartMusic(Songs.BackgroundSong); }
public Bus GetBus(string path) { FMOD.Studio.Bus bus; _system.getBus(path, out bus).Check(); return(Bus.FromFmod(bus)); }
void Start() { FMOD.Studio.System system = FMOD_StudioSystem.instance.System; system.getBus("bus:/", out masterBus); if (!PlayerPrefs.HasKey("muted")) { PlayerPrefs.SetInt("muted", 0); } if (PlayerPrefs.GetInt("muted") == 1) { masterBus.setMute(true); sounds.GetComponent <Image>().sprite = spriteSoundOff; } else if (PlayerPrefs.GetInt("muted") == 0) { masterBus.setMute(false); sounds.GetComponent <Image>().sprite = spriteSoundOn; } }
// Use this for initialization void Start() { //gc = GameObject.FindGameObjectWithTag ("GameController").GetComponent<GameController> (); FMOD.Studio.System system = FMOD_StudioSystem.instance.System; system.getBus("bus:/", out masterBus); if (!PlayerPrefs.HasKey("muted")) { PlayerPrefs.SetInt("muted", 0); } if (PlayerPrefs.GetInt("muted") == 1) { masterBus.setMute(true); sounds.GetComponent <SpriteRenderer>().sprite = spriteSoundOff; } else if (PlayerPrefs.GetInt("muted") == 0) { masterBus.setMute(false); sounds.GetComponent <SpriteRenderer>().sprite = spriteSoundOn; } }
void Start() { scoretime = GameObject.Find("Text").GetComponent <Text>(); sounds = GameObject.Find("Mute"); vicObj = Resources.Load("Prefabs/effects/prtclVictory") as GameObject; timer = GameObject.Find("Timer").GetComponent <GameTimer> (); camobj = GameObject.FindGameObjectWithTag("MainCamera"); camera = camobj.GetComponent <Camera> (); vicObj.transform.localScale = new Vector3(1f, 1f, 1f) * (camera.orthographicSize / (5.5f)); victory = vicObj.GetComponent <ParticleSystem> (); camera.nearClipPlane = 0.0f; vicpos = camera.transform.position + new Vector3(0f, -10f, 0f); Instantiate(playmat); StartCoroutine(WaitForPlaymatToLoad()); timer.StartTimer(); FMOD.Studio.System system = FMOD_StudioSystem.instance.System; system.getBus("bus:/", out masterBus); if (!PlayerPrefs.HasKey("muted")) { PlayerPrefs.SetInt("muted", 0); } if (PlayerPrefs.GetInt("muted") == 1) { masterBus.setMute(true); sounds.GetComponent <SpriteRenderer>().sprite = spriteSoundOff; } else if (PlayerPrefs.GetInt("muted") == 0) { masterBus.setMute(false); sounds.GetComponent <SpriteRenderer>().sprite = spriteSoundOn; } scoretime.text = "Score: " + playmat.GetComponent <Playmat> ().Points + "/" + playmat.GetComponent <Playmat> ().TotalPoints.ToString(); }