// Sets the course's detail on the CourseDescription panel under the Menu public void SetCourseDetails(int courseID) { UnityEngine.UI.Text DescriptionText = CourseDescription.GetComponent <UnityEngine.UI.Text>(); CourseInfoHolder info = courses.Courses[courseID]; Debug.Log(info.CourseTitle + "\n" + info.CourseDescription); DescriptionText.text = "<size=30>" + info.CourseTitle + "</size>\n<size=20>" + info.CourseDescription + "</size>"; }
// Modify the TitleBar text based on the currently active menu screen. private void SetTitleBarText() { switch (CurrentMenu) { case Menus.TITLE: TitleText.text = "<size=120%>Motion Instructor</size>\nWhat are we going to do today?"; break; case Menus.DANCE: TitleText.text = "<size=120%>Dance</size>\nLearn a new dance style, or challange yourself in one that you already know!"; break; case Menus.COURSES: TitleText.text = "<size=120%>Courses</size>\nSelect the dance style you want to learn!"; break; case Menus.FREEPLAY: TitleText.text = "<size=120%>Free play</size>\nChallenge yourself in your favourite coreographies!"; break; case Menus.SPECCOURSE: CourseInfoHolder info = courseMenuHelper.GetCurrentCourseInfo(); TitleText.text = "<size=120%>" + info.CourseTitle + "</size>\n" + info.CourseShortDescription; break; case Menus.SETTINGS: TitleText.text = "<size=120%>Settings</size>"; break; case Menus.AVATARSETTINGS: TitleText.text = "<size=120%>Avatar Settings</size>\nChange the avatar type and add more to the scene!"; break; case Menus.DIFFICULTYSETTINGS: TitleText.text = "<size=120%>Difficulty Settings</size>\nHarder settings mean more precise movements!"; break; case Menus.FEEDSETTINGS: TitleText.text = "<size=120%>Pose Input Settings</size>\nWhat channel do you want to send your poses?"; break; case Menus.FEEDBACKSETTINGS: TitleText.text = "<size=120%>Visualization Settings</size>\nAdd additional objects that shows how close you follow!"; break; case Menus.RECORDMENU: TitleText.text = "<size=120%>Record</size>\nRecord your own movements!"; break; case Menus.COREOMENU: TitleText.text = "<size=120%>Free Play!</size>\nTry your favourite coreographies!"; break; default: break; } }
// Loads the Course info without storing the steps for all available courses public void LoadAllCourseInfos() { foreach (KeyValuePair <string, string> entry in courseToPath) { string json_data = File.ReadAllText(entry.Value); CourseJSON course_steps = JsonUtility.FromJson <CourseJSON>(json_data); CourseInfoHolder course = new CourseInfoHolder(); course.CourseID = course_steps.CourseID; course.CourseTitle = course_steps.CourseTitle; course.CourseShortDescription = course_steps.CourseShortDescription; course.CourseDescription = course_steps.CourseDescription; courses.Courses.Add(course); } }
// Load all Coreographies. public void LoadFreeplay() { ClearState(); int id = 0; foreach (KeyValuePair <string, string> entry in courseToPath) { string json_data = File.ReadAllText(entry.Value); CourseJSON course_steps = JsonUtility.FromJson <CourseJSON>(json_data); CourseInfoHolder course = new CourseInfoHolder(); foreach (CoreographieContainer coreographie in course_steps.coreographies) { coreographies.Add(id++, coreographie); } } isTraining = false; GenerateCourseMenu(); }