//-------------------------------------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(); } }
public void Ontrackerloseevent(Imagetargettracker _imagetargettracker, GameObject _imagetarget) { curtrackerstatus = Trackerstatus.LOSE; if (_imagetargettracker.targetdata == null) { return; } switch (_imagetargettracker.targetdata.losetype) { case Bundlelosetype.DESTROY: _imagetargettracker.targetdata.Releaseinstantiatedtarget(); break; case Bundlelosetype.HIDING: _imagetargettracker.targetdata.Hideinstantiatedobject(); break; case Bundlelosetype.SCREEN2D: _imagetargettracker.targetdata.Updatetocenter(); break; } }