// Update is called once per frame
    void Update()
    {
        if (_pac.IsRunning() && !playingFootsteps)
        {
            _am.Play("Footsteps");
            playingFootsteps = true;
        }

        /*   else
         * {
         *     _am.Stop("Footsteps");
         *     playingFootsteps = false;
         * }*/
    }
Пример #2
0
    void ChangeLookAtPoint()
    {
        if (_animController.IsRunning())
        {
            lookAtPoint.localPosition = new Vector3(0, 0.4f, 0);
        }
        else if (_animController.IsSliding())
        {
            lookAtPoint.localPosition = new Vector3(0, -0.4f, 0);
        }

        if (Input.GetKeyDown(KeyCode.S) || SwipeInput.Instance.SwipeDown)
        {
            _am.Pause("Footsteps");
            this.ChangeBCHeight();
        }
    }