Exemplo n.º 1
0
    // Use this for initialization
    void Awake()
    {
        switch (controlMethod)
        {
        case ControlMethod.KbMouse:
            inputController = (IInputController)gameObject.AddComponent <KbMouseController>();
            pointer.Initialise(inputController, mouseHand);
            flyingCam.gameObject.SetActive(true);
            vrCameraRig.gameObject.SetActive(false);
            break;

        case ControlMethod.SixDof:
            inputController = (IInputController)gameObject.AddComponent <SixDOFController>();
            pointer.Initialise(inputController, vrHand);
            flyingCam.gameObject.SetActive(false);
            vrCameraRig.gameObject.SetActive(true);
            break;

        case ControlMethod.ThreeDof:
            inputController = (IInputController)gameObject.AddComponent <ThreeDOFController>();
            pointer.Initialise(inputController, vrHand);
            flyingCam.gameObject.SetActive(false);
            vrCameraRig.gameObject.SetActive(true);
            break;
        }

        inputController.Initialise();
    }