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