public void Input(ISetSO value) { if (value == null) { return; } Output.Invoke(value); }
public void Input(ISetSO value) { if (value == null) { return; } value.Message(message); }
public void Remove(ISetSO value) { if (value == null) { return; } values.Remove(value); OnRemove.Invoke(value); }
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; }