Example #1
0
        public override void Bindingeventstobtn()
        {
            close.onClick.AddListener(() =>
            {
                FindObjectOfType <Imagetargettracker>().targetdata.Releaseinstantiatedtarget();
                if (Uistack.Getinstance().Getcurdepth() > 2)
                {
                    Cloudrecoeventhandler.Getinstance().Stopscanning();
                    // Uimanager.Getinstance().Addblackfade(true,null);
                    Uistack.Getinstance().Return(2);
                    FindObjectOfType <Detaildescriptionview>().detailsetup.enabled = true;
                }
                else
                {
                    Cloudrecoeventhandler.Getinstance().Restartscanning();
                    Updateviewstatus(Viewstatus.SHOW);
                }
            });



            back.onClick.AddListener(() =>
            {
                Cloudrecoeventhandler.Getinstance().Stopscanning();
                Uistack.Getinstance().Return(2);
            });

            dropdown.onClick.AddListener(() => Onclickdropdown());
            dropup.onClick.AddListener(() => Onclickdropup());

            Takephotoorrecord.Getinstance().Recording.onrecorded = Onrecorded;
            Takephotoorrecord.Getinstance().Recording.onrecording = Updaterecordingprogress;
        }
Example #2
0
        internal void Parsingbundlecallback(Object obj)
        {
            if (this.imagetracker == null)
            {
                imagetracker = FindObjectOfType <Imagetargettracker>();
            }

            Getcurrecostatus = Scanstatus.SCANISDONE;
            //TODO:隐藏下载UI进度条
            Uimanager.Getinstance().Hideprogress();

            GameObject tmp = GameObject.Instantiate((GameObject)obj);

            tmp.transform.SetParent(Cloudrecoeventhandler.Getinstance().imagetargettemplate.transform);
            tmp.transform.localPosition    = Vector3.zero;
            tmp.transform.localEulerAngles = Vector3.zero;

            imagetracker.targetdata.losetype           = baseoperation.config.bundlelosetype;
            imagetracker.targetdata.rotation           = baseoperation.config.bundlerotation;
            imagetracker.targetdata.scale              = baseoperation.config.bundlescale;
            imagetracker.targetdata.centeroffset       = baseoperation.config.bundleposistionoffset;
            imagetracker.targetdata.Instantiatedobject = tmp;


            switch (curtrackerstatus)
            {
            case Trackerstatus.LOSE:
                Ontrackerloseevent(imagetracker, null);
                break;

            case Trackerstatus.FOUND:
                Ontrackerfoundevent(imagetracker, null);
                break;
            }


            if (onparsingitemend != null)
            {
                onparsingitemend.Invoke();
            }
        }
Example #3
0
        public override void Bindingeventstobtn()
        {
            //需要隐藏的界面
            Baseview hide = Uimanager.Getinstance().Getviewfromviewid(typeof(Mainview).Name);


            //打开showcase view
            Baseview showcaseview = Uimanager.Getinstance().Getviewfromviewid(typeof(Showcaseview).Name);

            showcase.onClick.AddListener(() =>
            {
                Uistack.Getinstance().Openview(showcaseview, Viewstatus.SHOW);
                Uistack.Getinstance().Openview(hide, Viewstatus.SHOW);
            });


            //打开menu view
            Baseview menuview = Uimanager.Getinstance().Getviewfromviewid(typeof(Menuview).Name);

            menu.onClick.AddListener(() =>
            {
                Uistack.Getinstance().Openview(menuview, Viewstatus.SHOW);
                Uistack.Getinstance().Openview(hide, Viewstatus.SHOW);
            });


            //打开scan view
            Baseview scanview = Uimanager.Getinstance().Getviewfromviewid(typeof(Scanview).Name);

            gotoscan.onClick.AddListener(() =>
            {
                Cloudrecoeventhandler.Getinstance().Restartscanning();
                Uistack.Getinstance().Openview(scanview, Viewstatus.SHOW);
                Uistack.Getinstance().Openview(hide, Viewstatus.SHOW);
            });
        }