mirror of
https://github.com/ConjureETS/GameOff2024.git
synced 2026-03-24 05:00:59 +00:00
25 lines
595 B
C#
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;
|
|
}
|
|
} |