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

            MsdkEvent.Instance.HandleWakeupNofify(ret);
        }