Example #1
0
    public void SwitchTut(int index)
    {
        current += index;
        //Debug.Log("current: " + current);
        EraseAll();

        if (current > 0)
        {
            left.SetActive(true);
        }

        else
        {
            left.SetActive(false);
        }
        if (current < ui_manager.courses.Count - 1)
        {
            right.SetActive(true);
        }

        else
        {
            right.SetActive(false);
        }
        if (!played_tut_list[current])
        {
            my_players.gameObject.SetActive(true);
            GameObject current_player = videos.transform.GetChild(current).gameObject;
            current_player.SetActive(true);
            my_players.myVideo = current_player.GetComponent <VideoPlayer>();
            my_players.PlayPause();
            played_tut_list[current] = true;
        }
        ui_manager.Get_Course(current);
    }