Ejemplo n.º 1
0
    // Update is called once per frame
    void FixedUpdate()
    {
        if (playerInput.GetAxisMovement() != null)
        {
            playerMovement.MoveCharacter(playerInput.GetAxisMovement());
        }

        if (playerInput.IsAttacking())
        {
            playerAttack.AttackEnemies();
        }

        if (playerInput.IsDroppingItem() == "Dropping Weapon")
        {
            inventory.equippedWeapon.DropWeapon(transform.position);
        }
        else if (playerInput.IsDroppingItem() == "Dropping Magic")
        {
        }

        if (playerInput.IsSprinting())
        {
            playerMovement.Sprint(playerInput.IsSprinting());
        }
        else if (!playerInput.IsSprinting())
        {
            playerMovement.Sprint(playerInput.IsSprinting());
        }
    }