Exemple #1
0
    public void BtnOnClick()
    {
        Vector3 point = getLocation();

        GPS = new Vector2(point.x, point.y);

        Debug.Log("当前距离:::" + GlobalInfo.Distance(GPS.y, GPS.x, float.Parse(locationY), float.Parse(locationX)) * 1000);
        if (GlobalInfo.Distance(GPS.y, GPS.x, float.Parse(locationY), float.Parse(locationX)) * 1000 < limitdistance)
        {
            foreach (var item in VersionFilesItems.Where(item => item.extName == "mp4"))
            {
                Debug.Log(item.filename);
                if (item.filename.Contains("qionghaixingcheng"))
                {
                    GlobalInfo.VideoURL2D = PublicAttribute.LocalFilePath + "/Panorama/1/" + item.filename;
                }
                else
                {
                    VideoURL = PublicAttribute.LocalFilePath + "/Panorama/1/" + item.filename;
                    Debug.Log(VideoURL);
                }
            }

            foreach (var item in VersionFilesItems.Where(item => item.extName == "vsz"))
            {
                Debug.Log(item.localPath);
                StartCoroutine(LoadAssets(item.localPath));
            }
        }
        else
        {
            mainUISet._inst.ShowUI(mainUISet.UIname.change, 1);
        }
    }
Exemple #2
0
    public void TurnChangeScene(string id)
    {
        foreach (var ChangeInfo in mainUISet.curScenicInfo.ResourcesInfos)
        {
            if (ChangeInfo.ResourcesKey == "more-change")
            {
                foreach (var gpsitem in ChangeInfo.DIS)
                {
                    if (gpsitem.baseEntity.name == id)
                    {
                        if (!isChangeScene)
                        {
                            isChangeScene = true;
                            Vector3 point = getLocation();

                            if (GlobalInfo.Distance(point.y, point.x, double.Parse(gpsitem.baseEntity.locationY), double.Parse(gpsitem.baseEntity.locationX)) < 40)
                            {
                                foreach (var item in gpsitem.VersionFilesItems.Where(item => item.extName == "mp4"))
                                {
                                    Debug.Log(item.filename);
                                    if (item.filename.Contains("qionghaixingcheng"))
                                    {
                                        GlobalInfo.VideoURL2D = PublicAttribute.LocalFilePath + "/Panorama/1/" + item.filename;
                                    }
                                    else
                                    {
                                        VideoURL = PublicAttribute.LocalFilePath + "/Panorama/1/" + item.filename;
                                        Debug.Log(VideoURL);
                                    }
                                }

                                foreach (var item in gpsitem.VersionFilesItems.Where(item => item.extName == "vsz"))
                                {
                                    Debug.Log(item.localPath);
                                    StartCoroutine(LoadAssets(item.localPath));
                                }
                            }
                        }
                    }
                }
            }
        }
    }