Ejemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        if ((Input.GetAxis("Horizontal") != 0) || (Input.GetAxis("Vertical") != 0))
        {
            pFunc.PlayerMove();
        }
        else
        {
            pFunc.walkSource.Pause();
        }

        if (Input.GetButtonDown("Dash"))
        {
            pFunc.InitDash();
        }

        if (Input.GetMouseButtonDown(0))
        {
            pAttack.initAttack();
            pVisuals.attackUpdate(pAttack.attackBox, pAttack);
        }

        if (Input.GetMouseButtonDown(1))
        {
            if (pAttack.canAttack() && !pPSystem.parrying)
            {
                pPSystem.DoParry();
            }
        }

        /*
         * if(Input.GetButtonDown("Roll"))
         * {
         *  pFunc.InitRoll();
         * }*/
    }