Add formatting rules
This commit is contained in:
@@ -3,33 +3,58 @@ using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
/// <summary>
|
||||
/// Handles the display of courses in the ListCourseScreen and CourseScreenManager scene
|
||||
/// </summary>
|
||||
public class CourseItem : MonoBehaviour
|
||||
{
|
||||
[Header("Course")]
|
||||
// Reference to the course
|
||||
/// <summary>
|
||||
/// Reference to the course object
|
||||
/// </summary>
|
||||
public Course course;
|
||||
// Progress of the current user on this course
|
||||
|
||||
/// <summary>
|
||||
/// Progress of the current user on this specific course
|
||||
/// </summary>
|
||||
public float progress;
|
||||
|
||||
[Header("UI references")]
|
||||
// Reference to thumbnail object
|
||||
/// <summary>
|
||||
/// UI Reference to the image for displaying the course thumbnail
|
||||
/// </summary>
|
||||
public Image thumbnail;
|
||||
// Reference to title object
|
||||
|
||||
/// <summary>
|
||||
/// UI Reference to the gameobject for displaying the course title
|
||||
/// </summary>
|
||||
public TMP_Text title;
|
||||
// Refetence to object so correct callback can be trigger on click
|
||||
|
||||
/// <summary>
|
||||
/// UI Reference to the button so the correct callback can be trigger on click
|
||||
/// </summary>
|
||||
public Button button;
|
||||
// Reference to progress bar
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the slider that displays the progress of the user
|
||||
/// </summary>
|
||||
public GameObject slider;
|
||||
// Reference to `COMPLETED`
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the gameobject that holds the text 'COMPLETED'
|
||||
/// </summary>
|
||||
public GameObject completed;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Start is called before the first frame update
|
||||
/// </summary>
|
||||
void Start()
|
||||
{
|
||||
// Use public function so that this component can get Instantiated
|
||||
GenerateContent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// (Re)generate the CourseItem object and update its appearance
|
||||
/// </summary>
|
||||
public void GenerateContent()
|
||||
{
|
||||
// Set appearance
|
||||
|
||||
Reference in New Issue
Block a user