//loads the SDK Settings menu public void loadSDKSettings() { //sends the event for a button press if (OnButtonPress != null) { OnButtonPress(); } //shows the load screen Utility.ShowLoadScreen(); SDKEventManager.LoadSDKScene(); }
//loads a new scene public void loadMode(string sceneName) { bool loadingAsync = false; if (OnButtonPress != null) { OnButtonPress(); } if (CraftingTutorialController.TutorialActive) { Utility.Log("Trying to load scene asynchronoushly"); StartCoroutine(LoadLevelAsync((int)GlobalVars.Scenes.Gathering)); loadingAsync = true; } if (sceneName == GlobalVars.GATHERING_BUTTON_NAME) { if (!readyToEnterGathering) //exits the loop if the user doesn't have four elements selected { return; } else { for (int i = 0; i < elementsInDropZones.Length; i++) //sets the elements for gathering { PlayerPrefs.SetString("ELEMENT" + (i + 1).ToString(), elementsInDropZones[i]); } if (OnEnterGathering != null) { OnEnterGathering(elementsInDropZones); } } } if (OnExitCrafting != null) { Utility.Log("Exiting the crafting mode event"); OnExitCrafting(); if (sceneName == GlobalVars.GATHERING_BUTTON_NAME && OnEnterScreen != null) { OnEnterScreen(GlobalVars.GATHERING_BUTTON_NAME); } } Utility.ShowLoadScreen(); if (loadingAsync) { return; } if (sceneName == "Gathering") { Application.LoadLevel((int)GlobalVars.Scenes.Gathering); } else if (sceneName == "Wiki") { Application.LoadLevel((int)GlobalVars.Scenes.Wiki); } else if (sceneName == "Credits") { Application.LoadLevel((int)GlobalVars.Scenes.Credits); } else if (sceneName == "SDK" && GlobalVars.MEDICAL_USE) //loads up the SDK settings { SDKEventManager.LoadSDKScene(); } }