Esempio n. 1
0
        private void LoadButton_OnClicked(Button button)
        {
            var popup = new PopupTextfield(CurrentLevelName);

            Menu.Instance.OpenPopup(popup);

            popup.OnDone += (sender, text) => {
                LevelUtil.LoadWorld(text);
                CurrentLevelName = text;
            };
        }
Esempio n. 2
0
        /// <summary>
        /// Switches to the Editor scene. If level is specified that level will be loaded.
        /// </summary>
        /// <param name="level">Level to load, null if new level</param>
        public static void SwitchScene(string level)
        {
            Application.NewScene();
            if (level != null)
            {
                LevelUtil.LoadWorld(level);
            }
            var editor = GameObject.Create <EditorScene>("EditorScene");

            if (level != null)
            {
                editor.CurrentLevelName = level;
            }
        }
Esempio n. 3
0
 public static void SwitchScene(string level)
 {
     Application.NewScene();
     LevelUtil.LoadWorld(level);
     GameObject.Create <PlayScene>("PlayScene");
 }