public void RemoveObject(RoomObject obj) { bool res = containedObjects.Remove(obj); if (res) { ObjectLeft?.Invoke(obj); } }
private void OnTriggerExit2D(Collider2D col) { T target = TryGetTargetFrom(col); if (target != null) { CheckHasEntry(target); if (hits[target].Contains(col)) { hits[target].Remove(col); objectsInArea.Remove(target); OnLeave(target); ObjectLeft?.Invoke(target); } } }
private void OnObjectLeft(ObjectReference obj) { ObjectLeft?.Invoke(obj); }
public virtual void OnObjectLeft(IItem obj) { SubItems.Remove(obj); ObjectLeft?.Invoke(this, obj); }