コード例 #1
0
ファイル: PickupWithHands.cs プロジェクト: zerratar/BabyYoda
 private void CollectAndEatFood(ICollectable collectable)
 {
     collectable.Disable();
     ItemInHand = collectable;
     Creature.Animator.SetInteger("CollectType", 0);
     Creature.Animator.SetTrigger("Collect");
 }
コード例 #2
0
ファイル: PickupWithForce.cs プロジェクト: zerratar/BabyYoda
    private void CollectAndEatFood(ICollectable collectable)
    {
        collectable.Disable();

        if (movingTarget)
        {
            return;
        }

        ItemInHand = collectable;
        Creature.Animator.SetInteger("CollectType", 1);
        Creature.Animator.SetTrigger("Collect");

        MoveTargetItem(collectable);
    }
コード例 #3
0
 public void OnCollect(ICollectable obj)
 {
     obj.Disable();
     obj.transform.SetParent(Creature.rightHandTransform);
 }