IEnumerator GetItemCatelogResponse(GetItemCatelogReceiver _GetItemCatelogReceiver) { string url = "http://api.openweathermap.org/data/2.5/weather?lat=" + Input.location.lastData.latitude + "&lon=" + Input.location.lastData.longitude + "&APPID=95306e9f0721ee115aeb609673b7d30e"; WWW www = new WWW(url); yield return www; _GetItemCatelogReceiver(www.text); }
private IEnumerator sendWWWForm(string text, string type, GetItemCatelogReceiver _GetItemCatelogReceiver) { WWWForm form = new WWWForm(); form.AddField("api_key", this.api_key); form.AddField("raw_text", text); form.AddField("type", type); WWW www = new WWW("http://255.255.255.255/CKIP/handle.php", form); yield return(www); _GetItemCatelogReceiver(www.text); }
public void getTerm(string text, GetItemCatelogReceiver _GetItemCatelogReceiver) { mono.StartCoroutine(sendWWWForm(text, "term", _GetItemCatelogReceiver)); }
public void getSentence(string text, GetItemCatelogReceiver _GetItemCatelogReceiver) { mono.StartCoroutine(sendWWWForm(text, "sentence", _GetItemCatelogReceiver)); }
void GetItemCatelog(GetItemCatelogReceiver _GetItemCatelogReceiver) { StartCoroutine("GetItemCatelogResponse", _GetItemCatelogReceiver); }