Exemple #1
0
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.I))
        {
            keyMapper.Invert();
        }

        if (Input.GetKeyDown(KeyCode.R))
        {
            SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
        }

        /* FlASH */
        if (flashActive)
        {
            flash.alpha = Mathf.MoveTowards(flash.alpha, 0, Time.deltaTime);
            flashActive = flash.alpha > Mathf.Epsilon;
        }
        /* FlASH */
    }