public void loadLevel() { SMSceneManager sm = SMGameEnvironment.Instance.SceneManager; if (isLevelAvailable(gameObject.name)) { sm.LoadLevel(gameObject.name); } }
public void loadLevel(string levelid) { SMSceneManager sm = SMGameEnvironment.Instance.SceneManager; if (isLevelAvailable(levelid)) { sm.LoadLevel(levelid); } }
private void RenderLevels(string[] levels) { GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); GUILayout.BeginVertical(); foreach (string levelId in levels) { GUI.enabled = levelProgress.GetLevelStatus(levelId) != SMLevelStatus.New; if (GUILayout.Button(levelId)) { sceneManager.LoadLevel(levelId); } GUI.enabled = true; } GUILayout.EndVertical(); GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); }