コード例 #1
0
    public void SetUp()
    {
        // create player and camera mock
        GameObject prefab = Resources.Load <GameObject>("Prefabs/Player_Mock");

        mock            = GameObject.Instantiate(prefab).transform;
        cameraTransform = mock.Find("TPV");

        // Third-Person-Controller
        controller = new ThirdPersonCamera(mock, 0f);

        //Set SPEED const
        System.Reflection.FieldInfo info = controller.GetType().GetField("SPEED", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
        info.SetValue(controller, SPEED);
    }