public IDeviceInput GetDeviceSelection() { IDeviceInput deviceInput = null; InputGeneralConfig config = Resources.Load <InputGeneralConfig>("Input/InputGeneralConfig"); if (config != null) { switch (config.deviceSelection) { case DeviceSelection.CARDBOARD: { deviceInput = new DeviceInputCardboard(); ModuleInput.Instance.Device = DeviceType.CARDBOARD; break; } case DeviceSelection.VIVE: { deviceInput = new DeviceInputVive(); break; } case DeviceSelection.RIFT: { deviceInput = new DeviceInputRift(); break; } } } deviceInput.Init(config); DetectConnectedHDM(); return(deviceInput); }
public override void Init(InputGeneralConfig config) { m_pointerImage.rectTransform.localScale = m_pointerImage.rectTransform.localScale * config.UIReticleSize; m_radialImage.rectTransform.localScale = m_radialImage.rectTransform.localScale * config.UIReticleSize; m_selectionTime = config.SelectionTime; m_radialImage.fillAmount = m_fillValue = 0f; m_enabled = true; }
public override void Init(InputGeneralConfig config) { m_enabled = true; m_selectionTime = Mathf.Infinity; }
public abstract void Init(InputGeneralConfig config);