Esempio n. 1
0
 public void Open()
 {
     menu.Close();
     panel.transform.localScale = Data.Instance.screenManager.scale;
     panel.SetActive(true);
     panel.GetComponent <Animation>().Play("PopupOn");
 }
Esempio n. 2
0
    private void Start()
    {
        _score           = 0;
        _scoreLabel.text = _score.ToString();

        _settingsMenu.Close();
    }
Esempio n. 3
0
    private IEnumerator MoveToPosition(GameObject cameraMover, Vector3 startPosition, Vector3 endPosition)
    {
        float elapsedTime = 0;
        float time        = 1f;

        while (elapsedTime < time)
        {
            float a = elapsedTime / time;
            cameraMover.transform.position = Vector3.Lerp(startPosition, endPosition, a);
            yield return(new WaitForEndOfFrame());

            elapsedTime += Time.deltaTime;
        }
        SettingsMenu.Close();
    }
Esempio n. 4
0
 public void Settings()
 {
     if (settingsMenu.isOpen)
     {
         settingsMenu.Close();
         playButton.SetActive(true);
         closeButton.SetActive(true);
     }
     else
     {
         settingsMenu.Open();
         playButton.SetActive(false);
         closeButton.SetActive(false);
     }
 }
Esempio n. 5
0
    public static void UnPause()
    {
        if (IsPaused)
        {
            settingsMenu.Close();

            if (!LevelCompletedScreen.IsOpen)
            {
                CameraController.LockCamera();
            }
            Time.timeScale = TimeController.CurrentTimeScale;
            Close();
            instance.gameObject.SetActive(false);
            IsPaused = false;
        }
    }
Esempio n. 6
0
    private void Start()
    {
        Player.PlayerInstance.gameObject.SetActive(false);
        settingsMenu.Close();
        sceneSelectMenu.Close();
        HUD.DisableHUD();

        Open();
        if (FlagsController.ControlSchemeChosen)
        {
            controlSchemeScreen.Close();
            OpenTitleScreen();
        }
        else
        {
            titleScreen.Close();
            OpenControlSchemeScreen();
        }
    }
Esempio n. 7
0
 void Start()
 {
     score = 0;
     settingMenu.Close();
     uprMenu.Close();
 }
Esempio n. 8
0
 // Called by OnClick() of CloseMenu button (linkedin in editor)
 public void OnClickCloseMenu()
 {
     menu.Close();
 }