Exemplo n.º 1
0
 public void AddBehaviour(ISimulativeBehaviour beh)
 {
     if (!ContainBehaviour(beh))
     {
         m_Behaviours.Add(beh);
         beh.Sim = this;
     }
 }
Exemplo n.º 2
0
 public void RemoveBehaviour(ISimulativeBehaviour beh)
 {
     if (ContainBehaviour(beh))
     {
         m_Behaviours.Remove(beh);
         beh.Sim = null;
     }
 }
Exemplo n.º 3
0
 public bool ContainBehaviour(ISimulativeBehaviour beh)
 {
     foreach (ISimulativeBehaviour item in m_Behaviours)
     {
         if (item == beh)
         {
             return(true);
         }
         if (item.GetType() == beh.GetType())
         {
             return(true);
         }
     }
     return(false);
 }