예제 #1
0
    void Update()
    {
        // BowAttack();
        AttackInput();

        combatTimer -= Time.deltaTime;


        if (Time.time - lastAttack < combatTime)
        {
            isOnCombat = true;
        }
        else
        {
            isOnCombat = false;
        }


        if (isOnCombat)
        {
            playerAnimatorController.OverrideMove(playerAnimationsMove[1]);
            playerAnimatorController.OverrideIdle(playerAnimationsIdle[1]);
        }
        else
        {
            playerAnimatorController.OverrideMove(playerAnimationsMove[0]);
            playerAnimatorController.OverrideIdle(playerAnimationsIdle[0]);
        }


        if (Input.GetKeyDown(KeyCode.F))
        {
            ChangeWeapons();
        }
    }