protected void Start() { // Initialize actions _InitializeActions(); // Initialize goals _InitializeGoals(); // Set state _SetState(); // Set goal _SetGoal(); // Set plan _SetPlan(); // Subscribe to plan completed _actionStateMachine.PlanCompleted_.AddListener(() => _SetPlan()); // Get in transition var transitionIn = _actionStateMachine.GetTransitionIn(); // Execute actions StartCoroutine(_actionStateMachine.ExecuteAction(transitionIn, getTransitionOut: () => null, setTransitionOut: transitionOut => { })); }
public IEnumerator ExecuteAction(float transitionIn, Func <float?> getTransitionOut, Action <float> setTransitionOut) { // Execute action yield return(_actionStateMachine.ExecuteAction(transitionIn, getTransitionOut, setTransitionOut)); }