Example #1
0
    // Update is called once per frame
    void Update()
    {
        if (_instance == null)
        {
            _instance = this;
        }
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            if (leaveGamePanel.activeSelf == true)
            {
                leaveGamePanel.SetActive(false);
            }
            else
            {
                leaveGamePanel.SetActive(true);
            }
        }

        if (GameIntro != null)
        {
            if (GameIntro.activeSelf == true)
            {
                if (Input.GetMouseButtonDown(0))
                {
                    GameIntro.SetActive(false);
                    ToGame();
                }
            }
        }
    }
 /// <summary>
 /// Awake is called when the script instance is being loaded.
 /// </summary>
 void Awake()
 {
     instance   = this;
     camEffects = Camera.main.GetComponent <PostProcessing>();
 }