public static int GetExitSceneIndex() { Debug.Log(Play.ToString()); int currentSceneIndex = SceneManager.GetActiveScene().buildIndex; int nextSceneIndex = -1; switch (Play) { case PlayType.LEVEL_BROWSER: nextSceneIndex = LEVEL_BROWSER_INDEX; break; case PlayType.LEVEL_SELECT: nextSceneIndex = LEVEL_SELECT_INDEX; break; case PlayType.PLAY_TEST: nextSceneIndex = EDITOR_INDEX; break; case PlayType.STORY_MODE: nextSceneIndex = MAIN_MENU_INDEX; break; } return(nextSceneIndex); }
public static int GetNextSceneIndex() { int currentSceneIndex = SceneManager.GetActiveScene().buildIndex; Debug.Log("Playtype: " + Play.ToString()); int nextSceneIndex = -1; if (Play == PlayType.LEVEL_SELECT) { nextSceneIndex = LEVEL_SELECT_INDEX; } else { if (currentSceneIndex < LEVEL_END_INDEX) { nextSceneIndex = currentSceneIndex + 1; } else { nextSceneIndex = MAIN_MENU_INDEX; } } Debug.Log("next index is: " + nextSceneIndex); return(nextSceneIndex); }
public MovieAction(XmlDocument xmlDocument, string resourceId, PlayType playType) : base(xmlDocument, "Movie") { ResourceId = resourceId; Operator = playType; Element.SetAttribute("ResourceID", resourceId); Element.SetAttribute("Operator", playType.ToString()); }
//rentcar_setting_enable //window_num (Used only in runviewer.adc..?) //time_limit - demo seconds //leave_limit //no_instant_replay public void WriteToXml(XmlWriter xml) { xml.WriteStartElement("play_style"); { xml.WriteElementValue("bspec_type", SpecType.ToString()); if (PlayType != PlayType.RACE) { xml.WriteElementValue("play_type", PlayType.ToString()); } xml.WriteElementBoolIfTrue("no_quickmenu", NoQuickMenu); if (!ReplayRecordEnable) { xml.WriteElementBool("replay_record_enable", ReplayRecordEnable); } } xml.WriteEndElement(); }