public override void DoAction(PlayerCharacter character, Selectable select)
        {
            if (select != null)
            {
                character.FaceTorward(select.transform.position);

                ItemProvider pond = select.GetComponent <ItemProvider>();
                if (pond != null)
                {
                    if (pond.HasItem())
                    {
                        character.FishItem(pond, 1);
                    }
                }
            }
        }
        //Fish item from a fishing spot
        public void FishItem(ItemProvider source, int quantity)
        {
            if (source != null && source.HasItem())
            {
                is_fishing = true;

                if (source != null)
                {
                    FaceTorward(source.transform.position);
                }

                TriggerAction(0.4f, () =>
                {
                    action_routine = StartCoroutine(FishRoutine(source, quantity));
                });
            }
        }
Beispiel #3
0
        public override bool CanDoAction(PlayerCharacter character, ItemSlot slot, Selectable select)
        {
            ItemProvider provider = select != null?select.GetComponent <ItemProvider>() : null;

            return(provider != null && provider.HasItem());
        }
        public override bool CanDoAction(PlayerCharacter character, Selectable select)
        {
            ItemProvider pond = select.GetComponent <ItemProvider>();

            return(pond != null && pond.HasItem() && character.EquipData.HasItemInGroup(fishing_rod) && !character.IsSwimming());
        }