A game about forced loneliness, made by TACStudios
at master 44 lines 1.3 kB view raw
1using System; 2using System.Collections.Generic; 3using UnityEngine; 4 5namespace Unity.Multiplayer.Center.Common 6{ 7 /// <summary> 8 /// Stores what the user answered in the GameSpecs questionnaire. The Preset is not included here. 9 /// </summary> 10 [Serializable] 11 public class AnswerData 12 { 13 /// <summary> 14 /// The list of answers the user has given so far. 15 /// </summary> 16 public List<AnsweredQuestion> Answers = new(); 17 18 /// <summary> 19 /// Makes a deep copy of the object. 20 /// </summary> 21 /// <returns>The clone</returns> 22 public AnswerData Clone() 23 { 24 return JsonUtility.FromJson(JsonUtility.ToJson(this), typeof(AnswerData)) as AnswerData; 25 } 26 } 27 28 /// <summary> 29 /// Answer to a single game spec question. 30 /// </summary> 31 [Serializable] 32 public class AnsweredQuestion 33 { 34 /// <summary> 35 /// The question identifier as defined in the game spec questionnaire. 36 /// </summary> 37 public string QuestionId; 38 39 /// <summary> 40 /// The answers selected by the user (most often, it contains only one element). 41 /// </summary> 42 public List<string> Answers; 43 } 44}