示例#1
0
    // Update is called once per frame
    void Update()
    {
        PlayerRaycast();
        bool canCall = true;   //used to make the script call "death" only once without it crashing

        if (!onTrack && canCall)
        {
            tBehav.DeathCall();
            canCall = false;
        }

        if (Input.GetKeyDown(KeyCode.UpArrow) || Input.GetKeyDown(KeyCode.DownArrow))
        {
            StartCoroutine(SuspendRay());
            Debug.Log("suspend");
        }
    }