Exemplo n.º 1
0
    void UpdatePickingUpAnimation()
    {
        bool isPickingUpOneHanded = false;
        bool isPickingUpTwoHanded = false;

        if (m_MovementModel.IsFrozen())
        {
            ItemType pickupItem = m_MovementModel.GetItemThatIsBeingPickedUp();

            if (m_MovementModel.GetItemThatIsBeingPickedUp() != ItemType.None)
            {
                ItemData itemData = DataBase.Item.FindItem(pickupItem);
                switch (itemData.pickUpAnimation)
                {
                case ItemData.PickUpAnimation.OneHanded:
                    isPickingUpOneHanded = true;
                    break;

                case ItemData.PickUpAnimation.TwoHanded:
                    isPickingUpTwoHanded = true;
                    break;
                }
            }
            else
            {
                isPickingUpOneHanded = false;
                isPickingUpTwoHanded = false;
            }
        }

        Animator.SetBool("IsPickingUpOneHanded", isPickingUpOneHanded);
        Animator.SetBool("IsPickingUpTwoHanded", isPickingUpTwoHanded);
    }