using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Video;
public class PanelMultipleChoice : MonoBehaviour
{
public GameObject previewMessage;
///
/// Reference to instructional video player
///
public VideoPlayer videoPlayer;
public Image playButton;
///
/// Reference to the image for displaying the current words sprite
///
public Transform optionContainer;
public GameObject optionPrefab;
public List signs;
public int currentSignIndex;
public void Display()
{
Learnable currentSign = signs[currentSignIndex];
videoPlayer.aspectRatio = VideoAspectRatio.FitInside;
videoPlayer.clip = currentSign.clip;
videoPlayer.Play();
// TODO: @Tibe find 3 other random indexes and make buttons for mc question (and set images and callbacks)
/**************************
* TODO: @Tibe
*
* Voor het initialiseren van die multiplechoice opties, er bestaat een prefab van die button, moet maar eens kijken
* Dus zelf gwn woorden kiezen voor de andere opties ad random.
* Zie dat je geen dubbels hebt in je opties (logisch)
*
* *************************/
}
///
/// This function is called when the pause-button is pressed on the video.
/// It switches between playing and pausing the video.
/// It then makes the button invisible when the video is playing, or visible when it's paused.
///
public void TogglePlayPause()
{
if (!videoPlayer.isPlaying)
// Play video and hide button
videoPlayer.Play();
else
// Pause video and show button
videoPlayer.Pause();
}
}