Exemple #1
0
 //default parameters sync = false
 public override BehaviorExecution createBehaviorExecution(InstanceSpecification host, Dictionary<String, ValueSpecification> p, bool sync)
 {
     if (name == "SimpleCommunicationBehavior")
     {
         System.Console.WriteLine(" ######## CREATE SIMPLE COM BEHAVIOR");
         SimpleCommunicationBehavior scb = new SimpleCommunicationBehavior((Behavior)this, host, p);
         scb.Interval = 0.5;
         return scb;
     }
     else if (name == "CommunicationBehavior")
     {
         System.Console.WriteLine(" ######## CREATE COM BEHAVIOR");
         CommunicationBehavior scb = new CommunicationBehavior((Behavior)this, host, p);
         scb.Interval = 0.5;
         return scb;
     }
     else if (name == "ProceduralBehavior")
     {
         ProceduralBehavior pb = new ProceduralBehavior((Behavior)this, host, p);
         pb.Interval = 0.5;
         return pb;
     }
     else if (name == "ActionListenerBehavior")
     {
         ActionListenerBehavior alb = new ActionListenerBehavior((Behavior)this, host, p);
         return alb as BehaviorExecution;
     }
     else
     {
         //BehaviorInitDeleterFunc operations
         return null;
     }
 }
Exemple #2
0
 //default parameters sync = false
 public override BehaviorExecution createBehaviorExecution(InstanceSpecification host, Dictionary <String, ValueSpecification> p, bool sync)
 {
     if (name == "SimpleCommunicationBehavior")
     {
         System.Console.WriteLine(" ######## CREATE SIMPLE COM BEHAVIOR");
         SimpleCommunicationBehavior scb = new SimpleCommunicationBehavior((Behavior)this, host, p);
         scb.Interval = 0.5;
         return(scb);
     }
     else if (name == "CommunicationBehavior")
     {
         System.Console.WriteLine(" ######## CREATE COM BEHAVIOR");
         CommunicationBehavior scb = new CommunicationBehavior((Behavior)this, host, p);
         scb.Interval = 0.5;
         return(scb);
     }
     else if (name == "ProceduralBehavior")
     {
         ProceduralBehavior pb = new ProceduralBehavior((Behavior)this, host, p);
         pb.Interval = 0.5;
         return(pb);
     }
     else if (name == "ActionListenerBehavior")
     {
         ActionListenerBehavior alb = new ActionListenerBehavior((Behavior)this, host, p);
         return(alb as BehaviorExecution);
     }
     else
     {
         //BehaviorInitDeleterFunc operations
         return(null);
     }
 }