You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
	
	
		
			
				
					
						
							|  |  |  |  | using System; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | namespace CleverCrow.Fluid.BTs.Tasks.Actions { | 
					
						
							|  |  |  |  |     public class ActionGeneric : ActionBase { | 
					
						
							|  |  |  |  |         public Func<TaskStatus> updateLogic; | 
					
						
							|  |  |  |  |         public Action startLogic; | 
					
						
							|  |  |  |  |         public Action initLogic; | 
					
						
							|  |  |  |  |         public Action exitLogic; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         protected override TaskStatus OnUpdate () { | 
					
						
							|  |  |  |  |             if (updateLogic != null) { | 
					
						
							|  |  |  |  |                 return updateLogic(); | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             return TaskStatus.Success; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         protected override void OnStart () { | 
					
						
							|  |  |  |  |             startLogic?.Invoke(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         protected override void OnExit () { | 
					
						
							|  |  |  |  |             exitLogic?.Invoke(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         protected override void OnInit () { | 
					
						
							|  |  |  |  |             initLogic?.Invoke(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |     } | 
					
						
							|  |  |  |  | } |