36 lines
986 B
C#
36 lines
986 B
C#
using System.Collections;
|
|
using UnityEngine;
|
|
|
|
/// <summary>
|
|
/// Class to display feedback during a course
|
|
/// </summary>
|
|
public abstract class AbstractFeedback : MonoBehaviour, Listener
|
|
{
|
|
/// <summary>
|
|
/// Reference to the sign predictor
|
|
/// </summary>
|
|
public SignPredictor signPredictor;
|
|
|
|
/// <summary>
|
|
/// The function that is called by the publisher on all its listeners
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public IEnumerator ProcessIncomingCall()
|
|
{
|
|
yield return StartCoroutine(UpdateFeedback());
|
|
}
|
|
|
|
/// <summary>
|
|
/// A function to add yourself as listener to the signPredictor you are holding
|
|
/// </summary>
|
|
public void AddSelfAsListener()
|
|
{
|
|
signPredictor.listeners.Add(this);
|
|
}
|
|
|
|
/// <summary>
|
|
/// The function that holds the logic to process the new probabilities of the signPredictor
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
protected abstract IEnumerator UpdateFeedback();
|
|
} |