コード例 #1
0
ファイル: ParentAgent.cs プロジェクト: sawat80/Simulais
 protected bool RemoveChild(ChildAgent agent)
 {
     if (!children.Contains(agent))
     {
         throw new Exception("Child not found!");
     }
     return(children.Remove(agent));
 }
コード例 #2
0
ファイル: ParentAgent.cs プロジェクト: sawat80/Simulais
		protected void AddChild(ChildAgent agent)
		{
			if (children.Contains(agent))
			{
				throw new Exception("Child already exists!");
			}
			children.Add(agent);
		}
コード例 #3
0
ファイル: ParentAgent.cs プロジェクト: sawat80/Simulais
 protected void AddChild(ChildAgent agent)
 {
     if (children.Contains(agent))
     {
         throw new Exception("Child already exists!");
     }
     children.Add(agent);
 }
コード例 #4
0
ファイル: ParentAgent.cs プロジェクト: sawat80/Simulais
		protected bool RemoveChild(ChildAgent agent)
		{
			if (!children.Contains(agent))
			{
				throw new Exception("Child not found!");
			}
			return children.Remove(agent);
		}