Exemple #1
0
 public void Start()
 {
     web          = GameObject.Find(GlobalInfo.websiterequest).GetComponent <webrequest>();
     nameTxt.text = name;
     _init(thumbnail.localPath);
     LocalAddress = thumbnail.localPath;
 }
Exemple #2
0
    private void Start()
    {
        web = GameObject.Find(GlobalInfo.websiterequest).GetComponent <webrequest>();
        if (dynamicFlag.Contains("1"))
        {
            icons[2].SetActive(true);
        }
        if (dynamicFlag.Contains("2"))
        {
            icons[3].SetActive(true);
        }
        if (dynamicFlag.Contains("3"))
        {
            icons[0].SetActive(true);
        }
        if (dynamicFlag.Contains("4"))
        {
            icons[1].SetActive(true);
        }

        //Debug.Log(thumbnail.localPath);

        //HttpManager.Instance.Download(thumbnail, (() =>
        //{
        //    _init(thumbnail.localPath);
        //}));
    }
Exemple #3
0
    private void Awake()
    {
        item = transform.GetComponent <GPSItem>();
        Transform iconRoot = GameObject.Find("Canvas/Markers").transform;

        state = Instantiate(Resources.Load(stateIconPrefab)) as GameObject;
        GpsConvert.icon.Add(state);
        state.name   = item.name;
        recTransform = state.GetComponent <RectTransform>();
        recTransform.SetParent(iconRoot);

        web = GameObject.Find(GlobalInfo.websiterequest).GetComponent <webrequest>();

        webbtn = state.transform.Find("infobg").GetComponent <Button>();
        webbtn.onClick.AddListener(delegate()
        {
            web.LoadWebSetTitle(item.address, item.name);
        });

        raw = state.transform.Find("infobg/pic").GetComponent <RawImage>();

        infodisText       = state.transform.Find("infobg/pic/bottom/distance").GetComponent <Text>();
        infonameText      = state.transform.Find("infobg/pic/bottom/name").GetComponent <Text>();
        infonameText.text = item.name;
        describeText      = state.transform.Find("infobg/info").GetComponent <Text>();
        describeText.text = item.content;

        infobg  = state.transform.Find("infobg").GetComponent <Transform>();
        iconbg  = state.transform.Find("iconbg").GetComponent <Transform>();
        namebg1 = state.transform.Find("namebg1").GetComponent <Transform>();
        namebg2 = state.transform.Find("namebg2").GetComponent <Transform>();
        LoadType(item.typeName);

        StartCoroutine(LoadImgFromCache(item.thumbnail.localPath, raw));
    }
Exemple #4
0
 public void Start()
 {
     #if UNITY_EDITOR || UNITY_IPHONE || UNITY_IOS || UNITY_ANDROID
     limitdistance = 999999999999;
     #elif UNITY_ANDROID
     limitdistance = 40;
     #endif
     web          = GameObject.Find(GlobalInfo.websiterequest).GetComponent <webrequest>();
     info.text    = content;
     title.text   = name;
     LocalAddress = thumbnail.localPath;
     _init(thumbnail.localPath);
 }
Exemple #5
0
        public override object GetEntity(Uri absoluteUri, string role, Type ofObjectToReturn)
        {
            if (ofObjectToReturn == null)
            {
                ofObjectToReturn = typeof(Stream);
            }
            if (ofObjectToReturn != typeof(Stream))
            {
                throw new XmlException("This object type is not supported.");
            }

#if NET_2_0
            if (!absoluteUri.IsAbsoluteUri)
            {
                throw new ArgumentException("uri must be absolute.", "absoluteUri");
            }
#endif

#if NOT_PFX
            if (absoluteUri.Scheme == "file")
            {
                if (absoluteUri.AbsolutePath == String.Empty)
                {
                    throw new ArgumentException("uri must be absolute.", "absoluteUri");
                }
                return(new FileStream(UnescapeRelativeUriBody(absoluteUri.LocalPath), FileMode.Open, FileAccess.Read, FileShare.Read));
            }
#endif
            throw new NotImplementedException();
            return(null);

#if NOT_PFX
#if net_2_1
            // so, what can i do here? httpwebrequest cannot be instantiated within system.dll
            throw new notimplementedexception();
#else
            // (ms documentation says) parameter role isn't used yet.
            webrequest req = webrequest.create(absoluteuri);
            if (credential != null)
            {
                req.credentials = credential;
            }
            return(req.getresponse().getresponsestream());
#endif
#endif
        }
Exemple #6
0
 // Use this for initialization
 public void _init(string assetpath)
 {
     web = GameObject.Find(GlobalInfo.websiterequest).GetComponent <webrequest>();
     StartCoroutine(LoadImgFromCache(assetpath, jpg));
 }
 void Start()
 {
     //This function get called when the game starts,
     //here it maps the external scripts
     TOucher = this.gameObject.GetComponent<toucher>();
     WEbrequest = this.gameObject.GetComponent<webrequest>();
 }
Exemple #8
0
 void Awake()
 {
     instance = this;
 }