示例#1
0
文件: UDog.cs 项目: jasonboninger/dog
        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 => { }));
        }
示例#2
0
文件: Move.cs 项目: jasonboninger/dog
 public IEnumerator ExecuteAction(float transitionIn, Func <float?> getTransitionOut, Action <float> setTransitionOut)
 {
     // Execute action
     yield return(_actionStateMachine.ExecuteAction(transitionIn, getTransitionOut, setTransitionOut));
 }