Beispiel #1
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetButtonUp("Jump") && (Vector3.Distance(transform.position, spot.position) < 8.0) && scareFlag == true && c.getAwake() == false)
        {
            scareFlag = false;
            c.setAwake();
            slide.value += 1;
        }

        if (slide.value == 2 && hide.IsAlive() && c.getAwake() == false)
        {
            win.enabled = true;
        }

        if (Input.GetKeyUp("r"))
        {
            SceneManager.LoadScene(0);
        }
    }