Exemplo n.º 1
0
        private void TryPickUpAnimations()
        {
            if (character != null && !character.IsPlayingAction) //Try Picking UP WHEN THE CHARACTER IS NOT MAKING ANY ANIMATION
            {
                if (item.Align)
                {
                    StartCoroutine(MTools.AlignLookAtTransform(transform, item.transform, item.AlignTime));
                    StartCoroutine(MTools.AlignTransformRadius(transform, item.transform, item.AlignTime, item.AlignDistance * transform.localScale.y));
                }

                if (!item.PickReaction.TryReact(gameObject)) //Means if the animal does not have a pick up Animation that calls the PickUP method then It will do it manually
                {
                    PickUpItem();
                }
            }
            else
            {
                PickUpItem();
            }
        }