Example #1
0
 public virtual void RemoveAttribute(EntityAttribute attr)
 {
     for (int i = 0; i < attribList.Count; i++)
     {
         if (attribList[i].attr == attr)
         {
             attribList.RemoveAt(i);
             attr.OnRemove(this);
             i--;
         }
     }
 }
Example #2
0
 public virtual void RemoveAttributesByType(ENT_ATTR type)
 {
     for (int i = 0; i < attribList.Count; i++)
     {
         if (attribList[i].attr.type == type)
         {
             EntityAttribute rem = attribList[i].attr;
             Debug.Log("Removed " + rem.name);
             attribList.RemoveAt(i);
             rem.OnRemove(this);
             i--;
         }
     }
 }