Exemplo n.º 1
0
    private void ToggleDebugInfo()
    {
        if (args.Length != 1)
        {
            ShowError("Command \"Debug\" has no arguments.");
            return;
        }

        GameObject debug = UIStore.GetObject("Debug");

        debug.SetActive(!debug.activeSelf);
        Events.SendCommand(CommandType.ShowDebug, args);
    }
Exemplo n.º 2
0
    private void Start()
    {
        mainMenuWindow   = UIStore.GetObject("MainMenu");
        pauseWindow      = UIStore.GetObject("PauseWindow");
        timeWindow       = UIStore.GetObject("TimeWindow");
        settingsWindow   = UIStore.GetObject("SettingsWindow");
        loadingWindow    = UIStore.GetObject("LoadingWindow");
        generationWindow = UIStore.GetObject("GenerationWindow");
        worldTypesWindow = UIStore.GetObject("WorldTypesWindow");
        commandsWindow   = UIStore.GetObject("CommandsWindow");
        blockWindow      = UIStore.GetObject("BlockWindow");
        structureWindow  = UIStore.GetObject("StructureWindow");

        cursor = UIStore.GetObject("Cursor");

        modeWindows[0] = blockWindow;
        modeWindows[1] = structureWindow;

        blockWindow.SetActive(false);
        mainMenuWindow.SetActive(true);

        Events.OnStateChange += StateChangeHandler;
        Events.OnGameEvent   += GameEventHandler;
    }