/// <summary>
 /// Send tango event to be parsed by the UX library.
 /// </summary>
 private void Update()
 {
     if (m_dirty)
     {
         AndroidHelper.ParseTangoEvent(m_previousEvent.timestamp, (int)m_previousEvent.type, m_previousEvent.event_key, m_previousEvent.event_value);
         m_dirty = false;
     }
 }
Exemple #2
0
 /// <summary>
 /// Raises the Tango event available event handler event.
 /// </summary>
 /// <param name="tangoEvent">Tango event.</param>
 public void OnTangoEventMultithreadedAvailableEventHandler(Tango.TangoEvent tangoEvent)
 {
     if (m_enableUXLibrary)
     {
         AndroidHelper.ParseTangoEvent(tangoEvent.timestamp,
                                       (int)tangoEvent.type,
                                       tangoEvent.event_key,
                                       tangoEvent.event_value);
     }
 }
Exemple #3
0
        /// <summary>
        /// Sends if tango event available.
        /// </summary>
        /// <param name="usingUXLibrary">If set to <c>true</c> using UX library.</param>
        public void SendIfTangoEventAvailable(bool usingUXLibrary)
        {
            if (m_isDirty)
            {
                if (usingUXLibrary)
                {
                    AndroidHelper.ParseTangoEvent(m_previousEvent.timestamp,
                                                  (int)m_previousEvent.type,
                                                  m_previousEvent.event_key,
                                                  m_previousEvent.event_value);
                }

                if (m_onTangoEventAvailable != null)
                {
                    m_onTangoEventAvailable(m_previousEvent);
                }

                m_isDirty = true;
            }
        }