/* * BeginTravel: Save current year user is in and travel to the planet executable * Parameters: None */ public void BeginTravel() { //Save the current year in an output text file //Write the year index to the following path string path; #if UNITY_EDITOR if (USystem.GetOculusBool()) { path = Application.dataPath + "/../Website/data/VRClubUniverseData/Oculus/saveData.txt"; //saveData not exist on my side } else { path = Application.dataPath + "/../Website/data/VRClubUniverseData/Vive/saveData.txt"; //saveData not exist on my side } #elif UNITY_STANDALONE if (USystem.GetOculusBool()) { path = Application.dataPath + "/../VRClubUniverseData/Oculus/saveData.txt"; //Change everything under VRClubUniverseData to VR../Vive/ } else { path = Application.dataPath + "/../VRClubUniverseData/Vive/saveData.txt"; //Change everything under VRClubUniverseData to VR../Vive/ } #endif string currentYear = UniverseSystem.GetInstance().GetCurrentYear(); Debug.Log("Writing current year to saveData file, year Index: " + currentYear); File.WriteAllText(path, currentYear); //Begin loading the executable Debug.Log("loading executable: " + executableString); ExecutableSwitch.LoadExe(executableString); }
// Initiate the Panels to be off void Start() { newpanels = UniverseSystem.GetInstance().panels; turnup = false; clearPanels(); displaytext.text = "Display: Off"; }
void Start() { if (!USystem) { USystem = UniverseSystem.GetInstance(); } }
// Update is called once per frame void Update() { if (tutorialsFinished == 0 && !tutorialPanels[0].GetComponent <TutorialMove>().IsFollowing()) { AdvanceTutorial(); } if (!isOculus) { if (tutorialsFinished == 1 && SearchPanelsControl.GetInstance().GetIfPanelsEnabled()) { AdvanceTutorial(); } } else { if (tutorialsFinished == 1 && OculusSearchPanelsControl.GetInstance().GetIfPanelsEnabled()) { AdvanceTutorial(); } } if (tutorialsFinished == 2 && !UniverseSystem.GetInstance().GetCurrentYear().Equals(UniverseSystem.LOBBY_YEAR_STRING)) { AdvanceTutorial(); } if (tutorialsFinished == 3 && CategoryManager.GetInstance().GetNumSelected() > 0) { AdvanceTutorial(); } }
public void PointerClick() { if (yearIndex != -1 && !UniverseSystem.GetInstance().IsCurrentlyTraveling()) { StartCoroutine(UniverseSystem.GetInstance().TeleportToYear(yearIndex)); } }
IEnumerator EndOfStartFrame() { yield return(new WaitForEndOfFrame()); UniverseSystem.GetInstance().GetYearRange(out minYear, out maxYear); SetPrimaryYear(maxYear); }
private bool IsCurrentYear() { int result = -1; if (Int32.TryParse(UniverseSystem.GetInstance().GetCurrentYear(), out result)) { return(result == yearValue); } else { return(false); } }
public void IncrementYear(int increment) { UniverseSystem.GetInstance().GetYearRange(out minYear, out maxYear); if (yearButtons.Length >= 1) { int adjustedMaxYear = yearButtons[0].YearValue + increment; int adjustedMinYear = yearButtons[yearButtons.Length - 1].YearValue + increment; if (adjustedMinYear <= maxYear && adjustedMaxYear >= minYear) { foreach (YearSelectGo year in yearButtons) { year.YearValue = year.YearValue + increment; } } } }