Exemplo n.º 1
0
 private void Start()
 {
     controller = I3vrControllerManager.RightController;
     if (!isRightSource)
     {
         controller = I3vrControllerManager.LeftController;
     }
 }
Exemplo n.º 2
0
 void Awake()
 {
     instance = GetComponent <I3vrController>();
     if (controllerProvider == null)
     {
         controllerProvider = ControllerProviderFactory.CreateControllerProvider();
     }
     Screen.sleepTimeout = SleepTimeout.NeverSleep;
 }
Exemplo n.º 3
0
        // Use this for initialization
        void Start()
        {
            controller = I3vrControllerManager.RightController;
            if (!isRightSource)
            {
                controller = I3vrControllerManager.LeftController;
            }

            buttonState = transform.FindChild("ButtonState");
            rawData     = transform.FindChild("RawData");
            deviceInfo  = rawData.FindChild("DeviceInfo");

            deviceName       = deviceInfo.FindChild("DeviceName").FindChild("Input").GetComponent <Text>();
            macAddress       = deviceInfo.FindChild("MacAddress").FindChild("Input").GetComponent <Text>();
            manufacturerName = deviceInfo.FindChild("ManufacturerName").FindChild("Input").GetComponent <Text>();
            modelNumber      = deviceInfo.FindChild("ModelNumber").FindChild("Input").GetComponent <Text>();
            serialNumber     = deviceInfo.FindChild("SerialNumber").FindChild("Input").GetComponent <Text>();
            hardwareRevision = deviceInfo.FindChild("HardwareRevision").FindChild("Input").GetComponent <Text>();
            firmwareRevision = deviceInfo.FindChild("FirmwareRevision").FindChild("Input").GetComponent <Text>();
            softwareRevision = deviceInfo.FindChild("SoftwareRevision").FindChild("Input").GetComponent <Text>();

            touch        = buttonState.FindChild("Front").FindChild("Touch").GetComponent <Image>();
            _return      = buttonState.FindChild("Front").FindChild("Return").GetComponent <Image>();
            app          = buttonState.FindChild("Front").FindChild("App").GetComponent <Image>();
            home         = buttonState.FindChild("Front").FindChild("Home").GetComponent <Image>();
            trigger      = buttonState.FindChild("Side").FindChild("Trigger").GetComponent <Image>();
            leftGesture  = buttonState.FindChild("Front").FindChild("LeftGesture").GetComponent <Image>();
            rightGesture = buttonState.FindChild("Front").FindChild("RightGesture").GetComponent <Image>();
            upGesture    = buttonState.FindChild("Front").FindChild("UpGesture").GetComponent <Image>();
            downGesture  = buttonState.FindChild("Front").FindChild("DownGesture").GetComponent <Image>();

            rotation_Pitch = rawData.FindChild("Rotation").FindChild("Pitch").FindChild("Input").GetComponent <Text>();
            rotation_Yaw   = rawData.FindChild("Rotation").FindChild("Yaw").FindChild("Input").GetComponent <Text>();
            rotation_Roll  = rawData.FindChild("Rotation").FindChild("Roll").FindChild("Input").GetComponent <Text>();

            gyro_Pitch = rawData.FindChild("Gyro").FindChild("Pitch").FindChild("Input").GetComponent <Text>();
            gyro_Yaw   = rawData.FindChild("Gyro").FindChild("Yaw").FindChild("Input").GetComponent <Text>();
            gyro_Roll  = rawData.FindChild("Gyro").FindChild("Roll").FindChild("Input").GetComponent <Text>();

            accele_Pitch = rawData.FindChild("Accele").FindChild("Pitch").FindChild("Input").GetComponent <Text>();
            accele_Yaw   = rawData.FindChild("Accele").FindChild("Yaw").FindChild("Input").GetComponent <Text>();
            accele_Roll  = rawData.FindChild("Accele").FindChild("Roll").FindChild("Input").GetComponent <Text>();

            touch_Pitch = rawData.FindChild("Touch").FindChild("Pitch").FindChild("Input").GetComponent <Text>();
            touch_Yaw   = rawData.FindChild("Touch").FindChild("Yaw").FindChild("Input").GetComponent <Text>();

            connectionStatus = rawData.FindChild("ConnectionStatus").GetComponent <Text>();
            touchOrigin      = touch.rectTransform.localPosition;

            frame = transform.FindChild("Frame").FindChild("Input").GetComponent <Text>();
        }
Exemplo n.º 4
0
        void Awake()
        {
            if (_SetRightController || _SetLeftController)
            {
                _rightController = _SetRightController;
                _leftController  = _SetLeftController;
            }
            else
            {
                Debug.LogError("Not Set Controller");
            }

            if (SetMainCamera)
            {
                _mainCamera = SetMainCamera;
            }
            else
            {
                Debug.LogError("Not Set MainCamera");
            }
        }
Exemplo n.º 5
0
 private void Awake()
 {
     controller = GetComponent <I3vrController>();
 }
Exemplo n.º 6
0
 void OnDestroy()
 {
     instance = null;
 }