示例#1
0
 public virtual void AddObject(ICarriableTrans obj)
 {
     if (!object.ReferenceEquals(obj, this))
     {
         if (this.destroying)
         {
             Debug.LogWarning("Did not add object because the this carrier is destroying", this);
         }
         else
         {
             this.TryInit();
             this._objs.Add(obj);
             obj.OnAddedToCarrier(this);
         }
     }
 }
示例#2
0
 public virtual void AddObject(ICarriableTrans obj)
 {
     if (object.ReferenceEquals(obj, this))
     {
         return;
     }
     if (!this.destroying)
     {
         this.TryInit();
         this._objs.Add(obj);
         obj.OnAddedToCarrier(this);
     }
     else
     {
         Debug.LogWarning("Did not add object because the this carrier is destroying", this);
     }
 }