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