private void Awake() { if (instance == null) { instance = this; saveFacade = new SaveFacade(); } else { Destroy(gameObject); } }
private static void CreateDesignDocument() { Console.WriteLine("Creating the Design Document Questions... \n \n"); DesignDocument designDocument = new DesignDocument(); Console.WriteLine("What would you like to call your design document? \n \n"); designDocument.DesignDocTitle = Console.ReadLine(); foreach (Question q in designDocument.Questions) { Console.WriteLine(q.QuestionToAsk); string answer = Console.ReadLine(); designDocument.AddUserNameToQuestion(q.QuestionIndex, answer); } Console.WriteLine("Would you like to add another question(Y/N) ? "); ConsoleKeyInfo userinput = Console.ReadKey(); designDocument.AddUserQuestion(userinput); SaveFacade SF = new SaveFacade(); SF.SaveXml(designDocument); SF.SaveTxt(designDocument); }