示例#1
0
    public void Exit()
    {
        UiAudioManager.GetInstance().PlayClickSound();

        Time.timeScale = 1;
        SceneManager.LoadScene("MainMenu");
    }
示例#2
0
    void Awake()
    {
        if (instance != null && instance != this)
        {
            Destroy(gameObject);
            return;
        }
        else
        {
            instance = this;
        }

        source = GetComponent <AudioSource>();

        DontDestroyOnLoad(gameObject);
    }
示例#3
0
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Escape) || Input.GetKeyDown(KeyCode.Backspace))
        {
            UiAudioManager.GetInstance().PlayClickSound();


            if (Time.timeScale == 1)
            {
                ActionManager.OnGamePaused();
            }
            else
            {
                ActionManager.OnGameResumed();
            }
        }
    }
示例#4
0
 public void AboutOff()
 {
     UiAudioManager.GetInstance().PlayClickSound();
     aboutPanel.SetActive(false);
 }
示例#5
0
 public void AboutShow()
 {
     UiAudioManager.GetInstance().PlayClickSound();
     aboutPanel.SetActive(true);
 }
示例#6
0
 public void OnBtnExit()
 {
     UiAudioManager.GetInstance().PlayClickSound();
     Application.Quit();
 }
示例#7
0
 public void OnBtnStartGame()
 {
     UiAudioManager.GetInstance().PlayClickSound();
     SceneManager.LoadScene("Toturial");
 }
示例#8
0
 public void Restart()
 {
     UiAudioManager.GetInstance().PlayClickSound();
     ActionManager.OnGameRestart();
 }