Пример #1
0
        //-------------------------------------Tracker call back------------------------------------------
        public void Ontrackerfoundevent(Imagetargettracker _imagetargettracker, GameObject _imagetarget)
        {
            //TODO:版本蓝图
            //1.识别图识别到后操作分为三大类型:A.基础类型操作(base),B.基于基础类型之上添加自定义操作(base+Custom),C.完全自定义操作(freedom)
            //2.识别到识别图后读取设置进行对识别图识别后进行区分操作
            //3.识别到识别图后进行的操作写入内容资源内部
            //4.调用资源内部方法进行执行

            if (!Browser.Getinstance().GetNetreachable(false))
            {
                return;
            }


            if (imagetracker != null)
            {
                if (!imagetracker.Equals(_imagetargettracker))
                {
                    imagetracker = _imagetargettracker;
                }
            }
            else
            {
                imagetracker = _imagetargettracker;
            }

            curtrackerstatus = Trackerstatus.FOUND;
            Scanview scanview = (Scanview)Uimanager.Getinstance().Getviewfromviewid(typeof(Scanview).Name);

            scanview.Updateviewstatus(Viewstatus.SHOW);
            if (_imagetargettracker.targetdata.Instantiatedobject != null)
            {
                _imagetargettracker.targetdata.Brokenlink();
            }
        }
Пример #2
0
 /// <summary>
 /// 获取扫描界面
 /// </summary>
 /// <returns></returns>
 private Scanview Getscanview()
 {
     if (scanview == null)
     {
         Baseview bv;
         viewdictionary.TryGetValue(typeof(Scanview).Name, out bv);
         return(scanview = ((Scanview)bv));
     }
     return(scanview);
 }
Пример #3
0
        /// <summary>
        /// 更新进度条
        /// </summary>
        /// <returns></returns>
        private IEnumerator Updatedownloadprogress()
        {
            while (true)
            {
                yield return(null);

                if (SKassetbundlehelper.instance.bundlewww == null)
                {
                    yield break;
                }
                progress = SKassetbundlehelper.instance.bundlewww.progress;

                scanview = Getscanview();
                scanview.progress.value = progress;
            }
        }
Пример #4
0
        /// <summary>
        /// 隐藏进度条
        /// </summary>
        public void Hideprogress()
        {
            progress = 0;
            if (coroutine != null)
            {
                StopCoroutine(coroutine);
                coroutine = null;
            }
            scanview = Getscanview();
            if (scanview == null)
            {
                return;
            }
            scanview.progress.gameObject.SetActive(false);
            scanview.progress.value = 0;

            //scanview.Updateviewstatus();
        }
Пример #5
0
 /// <summary>
 /// 显示进度条
 /// </summary>
 public void Showprogress()
 {
     if (SKassetbundlehelper.instance.bundlewww == null)
     {
         return;
     }
     scanview = Getscanview();
     //scanview.Updateviewstatus();
     if (coroutine != null)
     {
         StartCoroutine(coroutine);
     }
     else
     {
         coroutine = Updatedownloadprogress();
         StartCoroutine(coroutine);
     }
 }