Exemple #1
0
    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);
    }
Exemple #2
0
    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);
    }
Exemple #3
0
 public void getTerm(string text, GetItemCatelogReceiver _GetItemCatelogReceiver)
 {
     mono.StartCoroutine(sendWWWForm(text, "term", _GetItemCatelogReceiver));
 }
Exemple #4
0
 public void getSentence(string text, GetItemCatelogReceiver _GetItemCatelogReceiver)
 {
     mono.StartCoroutine(sendWWWForm(text, "sentence", _GetItemCatelogReceiver));
 }
Exemple #5
0
 void GetItemCatelog(GetItemCatelogReceiver _GetItemCatelogReceiver)
 {
     StartCoroutine("GetItemCatelogResponse", _GetItemCatelogReceiver);
 }