Documents/Quiz/Assets/Scripts/QuizEntry.cs

26 lines
562 B
C#
Raw Normal View History

2018-05-29 19:26:24 +02:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[System.Serializable]
public class QuizEntry {
public string question;
public List<string> answers;
public int answerId;
public bool IsValid { get { return answerId != -1; } }
public QuizEntry()
{
answers = new List<string>();
answerId = -1;
}
public QuizEntry(string question, List<string> answers, int answerId)
{
this.question = question;
this.answers = answers;
this.answerId = answerId;
}
}