Ejemplo n.º 1
0
    public void OpenSettings()
    {
        if (!SavingSystem.settingsOpened)
        {
            SavingSystem.settingsOpened = true;
            GameStateController.ExitGame();
            GameStateController.ReloadScene();
            return;
        }

        GameStateController.gameState = SavingSystem.state;
        if (Application.isMobilePlatform)
        {
            MobileEditionSettingsWindow.SetActive(true);
        }
        else
        {
            PCEditionSettingsWindow.SetActive(true);
        }

        PlayerController.instance.gameObject.SetActive(false);
        opened = true;

        if (!Application.isMobilePlatform)
        {
            Cursor.lockState = CursorLockMode.None;
            Cursor.visible   = true;
        }
    }
Ejemplo n.º 2
0
 private void OnTriggerEnter2D(Collider2D other)
 {
     GameStateController.ExitGame();
     GameStateController.ReloadScene();
 }
Ejemplo n.º 3
0
 private void OnCollisionEnter2D(Collision2D other)
 {
     GameStateController.ExitGame();
     GameStateController.ReloadScene();
 }