Пример #1
0
 public virtual void RemoveMember(AIGroupMember oldMember)
 {
     _members.Remove(oldMember);
     if (oldMember.MyGroup == this)
     {
         oldMember.MyGroup = null;
     }
 }
Пример #2
0
        public virtual void AddMember(AIGroupMember newMember)
        {
            Debug.Log("adding " + newMember);
            if (!_members.Contains(this))
            {
                if (newMember.MyGroup)
                {
                    newMember.MyGroup.RemoveMember(newMember);
                }

                _members.Add(newMember);
                newMember.MyGroup = this;
            }
        }