Beispiel #1
0
    public void RemoveObject(RoomObject obj)
    {
        bool res = containedObjects.Remove(obj);

        if (res)
        {
            ObjectLeft?.Invoke(obj);
        }
    }
Beispiel #2
0
        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);
                }
            }
        }
Beispiel #3
0
 private void OnObjectLeft(ObjectReference obj)
 {
     ObjectLeft?.Invoke(obj);
 }
Beispiel #4
0
 public virtual void OnObjectLeft(IItem obj)
 {
     SubItems.Remove(obj);
     ObjectLeft?.Invoke(this, obj);
 }