Esempio n. 1
0
        public virtual void OnTrackableStateChanged(TrackableBehaviour.Status previousStatus, TrackableBehaviour.Status newStatus)
        {
            Debug.Log("tracking " + Identifier +
                      " curr=" + IsTracking +
                      " state=" + newStatus);

            /*
             * if (m_trackableBehaviour && m_trackableBehaviour.VuMarkTarget != null && m_trackableBehaviour.VuMarkTarget.InstanceId != null)
             * {
             * Debug.Log("tracking " + m_trackableBehaviour.VuMarkTarget.InstanceId +
             *  " curr=" + IsTracking +
             *  " state=" + newStatus);
             * }
             */

            if (newStatus == TrackableBehaviour.Status.DETECTED ||
                newStatus == TrackableBehaviour.Status.TRACKED ||
                newStatus == TrackableBehaviour.Status.EXTENDED_TRACKED)
            {
                if (m_trackingTimer != null)
                {
                    m_trackingTimer.Cancel();
                    m_trackingTimer = null;
                }

                if (!IsTracking)
                {
                    StartExtendedTracking();

                    OnTrackingFound();
                }
                else if (newStatus == TrackableBehaviour.Status.EXTENDED_TRACKED)
                {
                    if (m_trackingTimer != null)
                    {
                        m_trackingTimer.Cancel();
                        m_trackingTimer = null;
                    }

                    m_trackingTimer = UnityTimer.Call(3, StopExtendedTracking);
                }
            }
            else
            {
                if (IsTracking)
                {
                    OnTrackingLost();
                }
            }

            /*
             * if (VuforiaWorld.Instance.TrackingConditionMonitor != null)
             * {
             *  VuforiaWorld.Instance.TrackingConditionMonitor.TrackingMarkersUpdated();
             * }
             */
        }
Esempio n. 2
0
 void CancelTimer()
 {
     if (m_timer != null)
     {
         m_timer.Cancel();
         m_timer = null;
     }
 }
Esempio n. 3
0
        public override void DidShow()
        {
            if (m_timer != null)
            {
                m_timer.Cancel();
            }

            m_timer = UnityTimer.Call(Time, () =>
            {
                if (Panel)
                {
                    Panel.Back();
                }
            });

            base.DidShow();
        }