25 lines
595 B
C#

using System;
using UnityEngine;
namespace GameOff.Core
{
public abstract class QuizTaker: MonoBehaviour
{
public event EventHandler OnAnswerUpdate;
[SerializeField] protected string[] answers;
protected virtual void Start()
{
answers = new string[QuizHandler.Instance.QuestionAmount];
}
protected void SetAnswer(int index, string answer)
{
answers[index] = answer;
OnAnswerUpdate?.Invoke(this, EventArgs.Empty);
}
public string[] Answers => answers;
}
}