Beispiel #1
0
 public virtual void RemoveMember(AIGroupMember oldMember)
 {
     _members.Remove(oldMember);
     if (oldMember.MyGroup == this)
     {
         oldMember.MyGroup = null;
     }
 }
Beispiel #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;
            }
        }