예제 #1
0
    public PlaylistData.Sources[] GetNextVideoSource()
    {
        if (data.playlist.Length <= questionID + 1)
        {
            return(null);
        }

        PlaylistData.VideoData nextData = data.playlist[questionID + 1];
        return(data.playlist[questionID + 1].sources);
    }
예제 #2
0
파일: Trivia.cs 프로젝트: pontura/escobar
    void LoadDataFromVideoData(PlaylistData.VideoData dataQuestion)
    {
        field.text = dataQuestion.title;
        string[] resp = Data.Instance.triviaData.GetAnswwers();

        for (int a = 0; a < 3; a++)
        {
            string r = resp[all[a]];
            AddButton(r, all[a]);
        }

        AnimateButtons(true);
    }
예제 #3
0
    public void AddToOldTraining(PlaylistData.VideoData videoData)
    {
        Training newTraining = new Training();

        newTraining.preguntas          = new Question();
        newTraining.preguntas.pregunta = videoData.title;
        string[] arr = videoData.description.Split("\n"[0]);
        if (arr != null && arr.Length == 3)
        {
            newTraining.preguntas.respuesta_bien  = arr[0];
            newTraining.preguntas.respuesta_mal_1 = arr[1];
            newTraining.preguntas.respuesta_mal_2 = arr[2];
            entrenamiento.Add(newTraining);
        }
    }
예제 #4
0
 void OnNewQuestion(PlaylistData.VideoData data)
 {
     lastTime = 0;
     //videoPlayer.Stop();
     loading.SetActive(true);
     playing      = false;
     triviaShowed = false;
     this.data    = data;
     if (videoPlayer.isPrepared)
     {
         VideoPlay();
     }
     else
     {
         waiting2Play = true;
     }
 }
예제 #5
0
 public void Init(PlaylistData.VideoData d, System.Action <PlaylistData.VideoData> OnClick)
 {
     this.OnClick = OnClick;
     this.data    = d;
     field.text   = d.title;
     string[] arr = d.description.Split("\n"[0]);
     if (arr == null || arr.Length < 3)
     {
         bien.text  = "";
         mal_1.text = "";
         mal_2.text = "";
     }
     else
     {
         bien.text  = arr[0];
         mal_1.text = arr[1];
         mal_2.text = arr[2];
     }
 }
예제 #6
0
 public void OnClicked(PlaylistData.VideoData data)
 {
     Data.Instance.triviaData.OPEN_VIDEO_EDIT(data.mediaid);
 }
예제 #7
0
 public string[] GetAnswwers()
 {
     PlaylistData.VideoData question = GetActualQuestion();
     return(question.description.Split("\n"[0]));
 }