void Start()
    {
        characterController = GetComponent <CharacterController>();

        // Lock cursor
        Cursor.lockState = CursorLockMode.Locked;
        Cursor.visible   = false;

        bool isVR = GameManager.mode == Mode.PC;

        gameObject.SetActive(isVR);

        VrHelper.SetEnabled(false);
    }
Exemplo n.º 2
0
    private void Awake()
    {
        bool isVR = GameManager.mode == Mode.VR;

        gameObject.SetActive(isVR);

        VrHelper.SetEnabled(true);

        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(gameObject);
            return;
        }

        leftController.Setup();
        rightController.Setup();
    }