Resolve WES-181 "Missing code doc"

This commit is contained in:
Dries Van Schuylenbergh
2023-05-14 20:18:29 +00:00
committed by Louis Adriaens
parent 7505ae7262
commit 3d99184717
67 changed files with 686 additions and 198 deletions

View File

@@ -4,20 +4,49 @@ using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Video;
/// <summary>
/// Class to handle panel with image, video and webcam
/// </summary>
public class PanelWithVideoAndImage : MonoBehaviour
{
/// <summary>
/// Reference to the feedback progress bar
/// </summary>
public GameObject feedbackProgressObject;
/// <summary>
/// Reference to the object containing the message for when the course is loaded in preview mode
/// </summary>
public GameObject previewMessage;
/// <summary>
/// True if the course is loaded in preview mode, false otherwise
/// </summary>
public bool isPreview;
/// <summary>
/// Video 'play' sprite
/// </summary>
public Sprite playSprite;
/// <summary>
/// Video 'pause' sprite
/// </summary>
public Sprite pauseSprite;
/// <summary>
/// Reference to instructional video player
/// </summary>
public VideoPlayer videoPlayer;
/// <summary>
/// Refrence to the video play/pause button
/// </summary>
public Image playButton;
/// <summary>
/// Reference to the webcam
/// </summary>
public RawImage webcamScreen;
/// <summary>
@@ -25,6 +54,9 @@ public class PanelWithVideoAndImage : MonoBehaviour
/// </summary>
public Transform signImageContainer;
/// <summary>
/// Reference to the prefab for displaying the image
/// </summary>
public GameObject signImagePrefab;
/// <summary>
@@ -42,9 +74,19 @@ public class PanelWithVideoAndImage : MonoBehaviour
/// </summary>
public Image feedbackProgressImage;
/// <summary>
/// Reference to the list of learnables
/// </summary>
public List<Learnable> signs;
/// <summary>
/// Index of the current learnable in the list with learnables
/// </summary>
public int currentSignIndex;
/// <summary>
/// Update the display of this panel
/// </summary>
public void Display()
{
Learnable currentSign = signs[currentSignIndex];
@@ -79,13 +121,11 @@ public class PanelWithVideoAndImage : MonoBehaviour
playButton.sprite = pauseSprite;
videoPlayer.Play();
}
else
{
// Pause video and and switch sprite of button
playButton.sprite = playSprite;
videoPlayer.Pause();
}
}
}