protected virtual void SetupTest() { FSM = Substitute.For <IStateMachine>(); FSM.Running.Returns(true); go = new GameObject(); state = go.AddComponent <S>(); state.Inject(FSM); }
/// <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(); }
/// <summary> /// Point of injection for testing. /// </summary> /// <param name="stateMachine">The state machine.</param> public void Inject(IStateMachineInternal stateMachine) { this.FSM = stateMachine; }