Exemple #1
0
 public void HandleLocationGotNotify(LocationRet ret)
 {
     try {
         if (LocateEvent != null)
         {
             LocateEvent(ret);
         }
     } catch (Exception e) {
         Debug.LogError(e.Message);
     }
 }
Exemple #2
0
 /// <summary>
 /// 解析json串,返回一个LocationRet,若解析失败返回null.
 /// </summary>
 /// <returns>The json.</returns>
 /// <param name="json">Json.</param>
 public static LocationRet ParseJson(string json)
 {
     try{
         LocationRet ret = JsonMapper.ToObject <LocationRet>(json);
         return(ret);
     }catch (Exception ex)
     {
         Debug.Log("errro:" + ex.Message + "\n" + ex.StackTrace);
     }
     return(null);
 }
Exemple #3
0
        public void OnLocationGotNotify(string jsonRet)
        {
            LocationRet ret = LocationRet.ParseJson(jsonRet);

            MsdkEvent.Instance.HandleLocationGotNotify(ret);
        }