示例#1
0
    public void DestroyObject(IUncatchable uncatchableObject)
    {
        if (this.createdUncatchableObjects.Contains(uncatchableObject))
        {
            this.createdUncatchableObjects.Remove(uncatchableObject);

            if (this.onDestroyUncatchableObject != null) {
                this.onDestroyUncatchableObject.Invoke (uncatchableObject);
            }

            GameObject.Destroy(uncatchableObject.GameObject);
        }
    }
示例#2
0
 public void AddObject(IUncatchable uncatchableObject)
 {
     if (!this.createdUncatchableObjects.Contains(uncatchableObject))
     {
         this.createdUncatchableObjects.Add(uncatchableObject);
     }
 }