示例#1
0
文件: Move.cs 项目: jasonboninger/dog
 public float GetTransitionIn()
 {
     // Set plan
     _actionStateMachine.Plan = _plan;
     // Return in transition
     return(_actionStateMachine.GetTransitionIn());
 }
示例#2
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 => { }));
        }