Exemplo n.º 1
0
 void Update()
 {
     //Anims
     animator.SetFloat("Speed", character.GetMove().magnitude);
     animator.SetInteger("Side", character.GetSideAnim());
     if (character_item != null)
     {
         animator.SetBool("Hold", character_item.GetHeldItem() != null);
     }
 }
Exemplo n.º 2
0
        public bool CanTake(GameObject taker)
        {
            CharacterHoldItem player       = taker.GetComponent <CharacterHoldItem>();
            CarryItem         current_item = player.GetHeldItem();

            if (current_item != null && item_type == current_item.item_type)
            {
                return(false);
            }

            if (take_timer >= -0.01f)
            {
                //Avoid taking back an item you just threw
                return(!throwing || last_bearer != taker);
            }

            return(false);
        }