Пример #1
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetButtonDown("Submit"))
        {
            pause = !pause;
        }

        if (pause)
        {
            cvsPause.enabled = true;
            Time.timeScale   = 0;
            scriptGun.ActivePause(true);
        }
        else
        {
            cvsPause.enabled = false;
            Time.timeScale   = 1;
            scriptGun.ActivePause(false);
        }
    }