public void HandleWakeupNofify(WakeupRet ret) { try { if (WakeupEvent != null) { WakeupEvent(ret); } } catch (Exception e) { Debug.LogError(e.Message); } }
/// <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); }
public void OnWakeupNotify(string jsonRet) { WakeupRet ret = WakeupRet.ParseJson(jsonRet); MsdkEvent.Instance.HandleWakeupNofify(ret); }