Add speech management

This commit is contained in:
WillJeynes
2026-08-24 18:50:49 +01:00
parent 7fa82ce8ec
commit 3396234653
5 changed files with 899 additions and 3 deletions
+42
View File
@@ -1,3 +1,5 @@
using UnityEngine;
namespace DefaultNamespace
{
public enum QuestionAnswer
@@ -6,4 +8,44 @@ namespace DefaultNamespace
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)];
}
}
}