示例#1
0
    public void RenderOnGUI()
    {
        GUILayout.BeginVertical("box");
        m_ScrollPos = GUILayout.BeginScrollView(m_ScrollPos, GUILayout.Width(Screen.width - 215), GUILayout.Height(Screen.height - 33));

        GUILayout.Label("BIsEnabled() : " + SteamMusic.BIsEnabled());

        GUILayout.Label("BIsPlaying() : " + SteamMusic.BIsPlaying());

        GUILayout.Label("GetPlaybackStatus() : " + SteamMusic.GetPlaybackStatus());

        if (GUILayout.Button("Play()"))
        {
            SteamMusic.Play();
            print("SteamMusic.Play()");
        }

        if (GUILayout.Button("Pause()"))
        {
            SteamMusic.Pause();
            print("SteamMusic.Pause()");
        }

        if (GUILayout.Button("PlayPrevious()"))
        {
            SteamMusic.PlayPrevious();
            print("SteamMusic.PlayPrevious()");
        }

        if (GUILayout.Button("PlayNext()"))
        {
            SteamMusic.PlayNext();
            print("SteamMusic.PlayNext()");
        }

        if (GUILayout.Button("SetVolume(1.0f)"))
        {
            SteamMusic.SetVolume(1.0f);
            print("SteamMusic.SetVolume(" + 1.0f + ")");
        }

        GUILayout.Label("GetVolume() : " + SteamMusic.GetVolume());

        GUILayout.EndScrollView();
        GUILayout.EndVertical();
    }
    public void RenderOnGUI()
    {
        GUILayout.Label("SteamMusic.BIsEnabled() : " + SteamMusic.BIsEnabled());
        GUILayout.Label("SteamMusic.BIsPlaying() : " + SteamMusic.BIsPlaying());
        GUILayout.Label("SteamMusic.GetPlaybackStatus() : " + SteamMusic.GetPlaybackStatus());

        if (GUILayout.Button("Play()"))
        {
            SteamMusic.Play();
            print("SteamMusic.Play()");
        }

        if (GUILayout.Button("Pause()"))
        {
            SteamMusic.Pause();
            print("SteamMusic.Pause()");
        }

        if (GUILayout.Button("PlayPrevious()"))
        {
            SteamMusic.PlayPrevious();
            print("SteamMusic.PlayPrevious()");
        }

        if (GUILayout.Button("PlayNext()"))
        {
            SteamMusic.PlayNext();
            print("SteamMusic.PlayNext()");
        }

        if (GUILayout.Button("SetVolume(1.0f)"))
        {
            SteamMusic.SetVolume(1.0f);
            print("SteamMusic.SetVolume(1.0f)");
        }

        GUILayout.Label("SteamMusic.GetVolume() : " + SteamMusic.GetVolume());
    }