Ejemplo n.º 1
0
 public static CharacterState StopMove(CharacterState state, Action.StopMove action)
 {
     state.isMoving     = false;
     state.moveDistance = Vector3.zero;
     Debug.Log($"in StopMove, returning state: {ObjectDumper.Dump(state)}");
     return(state);
 }
Ejemplo n.º 2
0
        public void Should_set_isMoving_to_false_on_Stop_action()
        {
            var mockStopAction = new Action.StopMove();

            mockCharacterState_.isMoving = true;

            var sut    = container_.Resolve <Reducer>();
            var result = sut.Reduce(mockCharacterState_, mockStopAction);

            Assert.IsFalse(result.isMoving);
        }