Esempio n. 1
0
        internal ToolbarManager()
        {
            Log.trace("ToolbarManager()");

            if (Instance == null) {
                Instance = this;
                InternalInstance = this;
                GameObject.DontDestroyOnLoad(this);

                commands_ = new HashSet<Command>();
                toolbars = new Dictionary<string, Toolbar>();

                UpdateChecker = new UpdateChecker();

                loadSettings(ToolbarGameScene.MAINMENU);
            } else {
                Log.warn("ToolbarManager already running, marking this instance as stale");
                running = false;
            }
        }
Esempio n. 2
0
        internal ToolbarManager()
        {
            Log.trace("ToolbarManager()");

            if (Instance == null) {
                Instance = this;
                GameObject.DontDestroyOnLoad(this);

                loadSettings(GameScenes.MAINMENU);

                toolbar = new Toolbar();
                toolbar.onChange += toolbarChanged;

                updateChecker = new UpdateChecker();
                updateChecker.OnDone += () => updateChecker = null;

                GameEvents.onGameSceneLoadRequested.Add(gameSceneLoadRequested);
            } else {
                Log.warn("ToolbarManager already running, marking this instance as stale");
                running = false;
            }
        }