Exemplo n.º 1
0
        public void Setup()
        {
            materialMock = new Mock <IMaterial>();
            materialMock.SetupGet(m => m.color).Returns(Color.red);

            rendererMock = new Mock <IRenderer>();
            rendererMock.SetupGet(r => r.material).Returns(materialMock.Object);

            transformMock = new Mock <ITransform>();
            transformMock.SetupGet(t => t.localPosition).Returns(new Vector3(0, 0, .2f));
            transformMock.SetupGet(t => t.localScale).Returns(new Vector3(.2f, .2f, .2f));

            gameObjectMock = new Mock <IGameObject>();
            gameObjectMock.SetupGet(g => g.transform).Returns(transformMock.Object);
            gameObjectMock.SetupGet(g => g.renderer).Returns(rendererMock.Object);
            gameObjectMock.SetupGet(g => g.network).Returns(Mock.Of <INetwork>());

            cubeFingerMock = new Mock <ICubeFinger>();
            cubeFingerMock.SetupGet(c => c.gameObject).Returns(gameObjectMock.Object);
            renderer = new CubeFingerRenderer(cubeFingerMock.Object);
        }
Exemplo n.º 2
0
        void ColorFinger(Vector3 color)
        {
            CubeFingerRenderer renderer = Finger.Renderer as CubeFingerRenderer;

            renderer.RPC_ColorFinger(color);
        }
Exemplo n.º 3
0
        void MoveFinger(NetworkViewID viewId, Vector3 displacement)
        {
            CubeFingerRenderer renderer = Finger.Renderer as CubeFingerRenderer;

            renderer.RPC_MoveFinger(viewId, displacement);
        }
Exemplo n.º 4
0
        void ShowFinger(int show)
        {
            CubeFingerRenderer renderer = Finger.Renderer as CubeFingerRenderer;

            renderer.RPC_ShowFinger(show);
        }