getBus() public method

public getBus ( string path, Bus &bus ) : RESULT
path string
bus Bus
return RESULT
コード例 #1
0
ファイル: Sounds.cs プロジェクト: Zyrst/ProjectSwiper
    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);
    }
コード例 #2
0
ファイル: System.cs プロジェクト: minimalism/SupersonicSound
        public Bus GetBus(string path)
        {
            FMOD.Studio.Bus bus;
            _system.getBus(path, out bus).Check();

            return(Bus.FromFmod(bus));
        }
コード例 #3
0
    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;
        }
    }
コード例 #4
0
ファイル: PauseMenu.cs プロジェクト: miskara/Projects
    // 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;
        }
    }
コード例 #5
0
ファイル: UI.cs プロジェクト: miskara/Projects
    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();
    }