Exemplo n.º 1
0
 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();
             }
         }
     }
 }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 bool IsSupportedKind(InputSourceKind kind)
 {
     return(kind != InputSourceKind.Unsupported);
 }