private void SetActiveInputSource(uint id, InputSourceKind kind) { if (activeInputId != id) { activeInputId = id; Debug.Log(string.Format("**CHANGING INPUT SOURCE to {0} ({1}", id, kind)); InputSource source = null; if (_inputSources.TryGetValue(id, out source)) { if (source.pointerEvent != null) { source.pointerEvent.Reset(); } } } }
public InputSource AddInputSource(uint id, InputSourceKind kind) { Debug.Log("InputModule::AddInputSource"); InputSource source = null; if (IsSupportedKind(kind)) { if (!this._inputSources.TryGetValue(id, out source)) { source = new InputSource(); source.ControllerId = id; source.Kind = kind; this._inputSources.Add(id, source); } } return(source); }
bool IsSupportedKind(InputSourceKind kind) { return(kind != InputSourceKind.Unsupported); }