Example #1
0
        /// <summary>
        /// Sets the required functions for the transition that it has received
        /// from the state machine.
        /// </summary>
        public void SetStateMachineFunctions(ITransitionDataRetriever <TBoolEnum, TTriggerEnum> stateMachine)
        {
            Assert.IsNotNull(stateMachine);

            this.stateMachine = stateMachine;
            StateMachineFunctionsSet();
        }
Example #2
0
        /// <summary>
        /// Add state machine data which is required for checking info
        /// </summary>
        public void SetStateDataRetrievers(ITransitionDataRetriever <TBoolEnum, TTriggerEnum> stateMachine)
        {
            this.stateMachine = stateMachine ?? throw new ArgumentNullException(
                                          paramName: nameof(stateMachine),
                                          message: "AITools.StateMachine argument cannot be null.");

            for (int i = 0; i < transitionConditions.Length; ++i)
            {
                transitionConditions[i].SetStateMachineFunctions(stateMachine);
            }
        }