Example #1
0
        protected virtual void SetupTest()
        {
            FSM = Substitute.For <IStateMachine>();
            FSM.Running.Returns(true);

            go    = new GameObject();
            state = go.AddComponent <S>();

            state.Inject(FSM);
        }
Example #2
0
 /// <summary>
 /// Pre-hook called by the Player Character when a player state is first added to the player.
 /// </summary>
 public void HiddenOnStateAdded(IStateMachineInternal stateMachine)
 {
     FSM = stateMachine;
     OnStateAddedGeneral();
     OnStateAdded();
 }
Example #3
0
 /// <summary>
 /// Point of injection for testing.
 /// </summary>
 /// <param name="stateMachine">The state machine.</param>
 public void Inject(IStateMachineInternal stateMachine)
 {
     this.FSM = stateMachine;
 }