示例#1
0
                         private IEnumerator CallSoundVolumeApi(string url, DelegateAfterGetVolume callback = null)
                         {
                             WWW www = new WWW(url);

                             yield return(www);

                             if (callback != null)
                             {
                                 string txt = "10";
                                 if (string.IsNullOrEmpty(www.error))
                                 {
                                     txt = www.text;
                                 }

                                 callback(int.Parse(txt));
                             }
                         }
示例#2
0
                         public void GetVolume(DelegateAfterGetVolume callback)
                         {
                             var url = Authentication.WebServicePath + "Settings/GetVolume";

                             StartCoroutine(CallSoundVolumeApi(url, callback));
                         }