Beispiel #1
0
    public PlayerController GetPlayerControllerMock(IAnimatorController animatorController)
    {
        var controller = Substitute.For <PlayerController>();

        controller.SetAnimatorController(animatorController);
        return(controller);
    }
Beispiel #2
0
    public PlayerController GetPlayerControllerMock(IAnimatorController animatorController, IPlayerMotorController movementController, GridController gridController)
    {
        var controller = Substitute.For <PlayerController>();

        controller.SetAnimatorController(animatorController);
        controller.SetPlayerMovementController(movementController);
        controller.SetGridController(gridController);
        movementController.IsMoving(Vector3.zero, Quaternion.identity).ReturnsForAnyArgs(true);
        return(controller);
    }