51 lines
1.2 KiB
C#
51 lines
1.2 KiB
C#
using UnityEngine;
|
|
|
|
namespace DefaultNamespace
|
|
{
|
|
public enum QuestionAnswer
|
|
{
|
|
YES,
|
|
NO,
|
|
NO_YES,
|
|
}
|
|
|
|
public static class QuestionAnswerExtensions
|
|
{
|
|
public static string ToRandomString(this QuestionAnswer answer)
|
|
{
|
|
string[] options = answer switch
|
|
{
|
|
QuestionAnswer.YES => new[]
|
|
{
|
|
"Yes",
|
|
"Absolutely",
|
|
"Affirmative",
|
|
"Definitely",
|
|
"Of course",
|
|
"Sure",
|
|
},
|
|
|
|
QuestionAnswer.NO => new[]
|
|
{
|
|
"No",
|
|
"Absolutely not",
|
|
"Negative",
|
|
"Definitely not",
|
|
"Nope",
|
|
"Not at all",
|
|
},
|
|
|
|
QuestionAnswer.NO_YES => new[]
|
|
{
|
|
"I cannot answer that question",
|
|
"I'm not sure",
|
|
"I don't know",
|
|
},
|
|
|
|
_ => new[] { answer.ToString() }
|
|
};
|
|
|
|
return options[Random.Range(0, options.Length)];
|
|
}
|
|
}
|
|
} |