Пример #1
0
 public void AddResItem(ResItem res)
 {
     if (!ResList.Contains(res))
     {
         ResList.Add(res);
         res.Group = this;
         AddKey(res.name);
     }
 }
Пример #2
0
 public void RemoveResItem(ResItem res)
 {
     if (ResList.Contains(res))
     {
         ResList.Remove(res);
         res.Group = null;
         RemoveKey(res.name);
     }            
 }
Пример #3
0
 internal void OnGroupChanged(ResItem resItem, string oldGroupName)
 {
     ResGroup oldGroup = GetResGroup(oldGroupName);
     if (oldGroup != null)
     {
         oldGroup.RemoveResItem(resItem);
     }
     ResGroup newGroup = GetResGroup(resItem.groupName);
     if (newGroup != null)
     {
         newGroup.AddResItem(resItem);
     }
 }