Exemplo n.º 1
0
 private void PassObjectsToController()
 {
     // Is this the best way to use Unity related objects?
     controller.SetState(State);
     controller.SetMovementSpeed(movementSpeed);
     controller.SetRotatonSpeed(rotationSpeed);
 }
Exemplo n.º 2
0
        public void SetUp()
        {
            unityGameObjectProxyMock.Reset();
            unityTimeProxyMock.Reset();
            gameStateMock.Reset();
            fakePlayerInstance = GameObjectBuilder.New()
                                 .WithPositionAndRotation(Vector3.zero, Quaternion.identity)
                                 .WithRigidbody()
                                 .Build();

            controller = new RemoteMovementController(unityGameObjectProxyMock.Object);
            controller.SetState(gameStateMock.Object);

            unityGameObjectProxyMock.Setup(x => x.Find(It.IsAny <string>())).Returns(fakePlayerInstance);
        }