示例#1
0
 protected bool RemoveChild(ChildAgent agent)
 {
     if (!children.Contains(agent))
     {
         throw new Exception("Child not found!");
     }
     return(children.Remove(agent));
 }
示例#2
0
		protected void AddChild(ChildAgent agent)
		{
			if (children.Contains(agent))
			{
				throw new Exception("Child already exists!");
			}
			children.Add(agent);
		}
示例#3
0
 protected void AddChild(ChildAgent agent)
 {
     if (children.Contains(agent))
     {
         throw new Exception("Child already exists!");
     }
     children.Add(agent);
 }
示例#4
0
		protected bool RemoveChild(ChildAgent agent)
		{
			if (!children.Contains(agent))
			{
				throw new Exception("Child not found!");
			}
			return children.Remove(agent);
		}