Exemple #1
0
    public void HandlePause()
    {
        if (Input.GetKeyDown(KeyCode.P) || Input.GetKeyDown(KeyCode.Joystick1Button7))
        {
            if (IsPaused == false)
            {
                G4.LogEvent("PressedStart", "Paused", "HasPaused", 1);

                // Builder Hit with all Event parameters.
                G4.LogEvent(new EventHitBuilder()
                            .SetEventCategory("PressButton")
                            .SetEventAction("Paused")
                            .SetEventLabel("HasPressed")
                            .SetEventValue(1));

                Debug.Log("Sent");
                Time.timeScale = 0;
                PauseMenuUI.SetActive(true);
                MainPauseUI.SetActive(true);
                QuitToMainUI.SetActive(false);
                ControlsUI.SetActive(false);
                IsPaused = true;
            }
            else
            {
                Time.timeScale = 1;
                QuitToMainUI.SetActive(false);
                ControlsUI.SetActive(false);
                MainPauseUI.SetActive(true);
                PauseMenuUI.SetActive(false);
                IsPaused = false;
            }
        }
    }
Exemple #2
0
    public void HandleToMain()
    {
        G4.LogEvent("PressButton", "MainButton", "HasPressed", 1);

        // Builder Hit with all Event parameters.
        G4.LogEvent(new EventHitBuilder()
                    .SetEventCategory("PressButton")
                    .SetEventAction("MainButton")
                    .SetEventLabel("HasPressed")
                    .SetEventValue(1));

        Debug.Log("Sent");
        QuitToMainUI.SetActive(true);
        MainPauseUI.SetActive(false);
    }
Exemple #3
0
    public void HandleBack()
    {
        G4.LogEvent("ResumeGame", "Unpaused", "Back", 1);

        // Builder Hit with all Event parameters.
        G4.LogEvent(new EventHitBuilder()
                    .SetEventCategory("ResumeGame")
                    .SetEventAction("Unpaused")
                    .SetEventLabel("Back")
                    .SetEventValue(1));

        Debug.Log("Sent");
        Time.timeScale = 1;
        QuitToMainUI.SetActive(false);
        ControlsUI.SetActive(false);
        MainPauseUI.SetActive(true);
        PauseMenuUI.SetActive(false);
        IsPaused = false;
    }