File tree Expand file tree Collapse file tree
BehaviorLibrary/Components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ public class BehaviorAction : BehaviorComponent
1010
1111 private Func < BehaviorReturnCode > ba_Action ;
1212
13+ public BehaviorAction ( ) { }
1314
1415 public BehaviorAction ( Func < BehaviorReturnCode > action )
1516 {
Original file line number Diff line number Diff line change 55
66namespace BehaviorLibrary . Components . Composites
77{
8- class ParallelSelector : BehaviorComponent
8+ public class ParallelSelector : BehaviorComponent
99 {
1010
1111 protected BehaviorComponent [ ] p_Behaviors ;
@@ -34,6 +34,33 @@ public ParallelSelector(params BehaviorComponent[] behaviors)
3434 /// <returns>the behaviors return code</returns>
3535 public override BehaviorReturnCode Behave ( )
3636 {
37+
38+ for ( int i = 0 ; i < p_SelLength ; i ++ )
39+ {
40+ try
41+ {
42+ switch ( p_Behaviors [ i ] . Behave ( ) )
43+ {
44+ case BehaviorReturnCode . Failure :
45+ continue ;
46+ case BehaviorReturnCode . Success :
47+ ReturnCode = BehaviorReturnCode . Success ;
48+ return ReturnCode ;
49+ case BehaviorReturnCode . Running :
50+ ReturnCode = BehaviorReturnCode . Running ;
51+ return ReturnCode ;
52+ default :
53+ continue ;
54+ }
55+ }
56+ catch ( Exception )
57+ {
58+ continue ;
59+ }
60+ }
61+
62+
63+ /*
3764 while (p_Selections < p_SelLength)
3865 {
3966 try
@@ -60,7 +87,7 @@ public override BehaviorReturnCode Behave()
6087 p_Selections++;
6188 continue;
6289 }
63- }
90+ }*/
6491
6592 p_Selections = 0 ;
6693 ReturnCode = BehaviorReturnCode . Failure ;
You can’t perform that action at this time.
0 commit comments