Ejemplo n.º 1
0
 public void Input(ISetSO value)
 {
     if (value == null)
     {
         return;
     }
     Output.Invoke(value);
 }
Ejemplo n.º 2
0
 public void Input(ISetSO value)
 {
     if (value == null)
     {
         return;
     }
     value.Message(message);
 }
Ejemplo n.º 3
0
 public void Remove(ISetSO value)
 {
     if (value == null)
     {
         return;
     }
     values.Remove(value);
     OnRemove.Invoke(value);
 }
Ejemplo n.º 4
0
 public void Add(ISetSO value)
 {
     if (value == null)
     {
         return;
     }
     values.Add(value);
     OnAdd.Invoke(value);
 }
        public void RemoveInteractable(Collider value)
        {
            var _interactable = value.GetComponent <ISetSO>();

            if (_interactable == null)
            {
                return;
            }
            interactable = null;
            objectRelay  = null;
        }
        public void SetInteractable(Collider value)
        {
            var _interactable = value.GetComponent <ISetSO>();

            if (_interactable == null)
            {
                return;
            }
            interactable = _interactable;
            objectRelay  = value.GetComponent <ISetObject>();

            cachedInteractable = interactable;
            cachedObjectRelay  = objectRelay;
        }
        public void Pickup()
        {
            var nearby = Physics.OverlapSphere(center, range);

            Debug.Log(nearby.Length);

            foreach (var item in nearby)
            {
                var interactable = item.GetComponent <ISetSO>();
                if (interactable == null)
                {
                    continue;
                }
                itemInHand = interactable;
                break;
            }

            itemInHand?.Message(pickupMessage);
        }
 public void Drop()
 {
     itemInHand?.Message(dropMessage);
     itemInHand = null;
 }