void GetGameDataCallBack(Web.RequestHandle handle) { Debug.Assert(mode == Mode.LOBBY || mode == Mode.INGAME); if (handle.Success) { JSONObject data = handle.ResultData; Logger.Instance.Log("DETAIL", "gamedata: " + data.ToString()); handle.dataCallback(data); } }
void GetNotificationHistoryCallBack(Web.RequestHandle handle) { Debug.Assert(mode == Mode.INGAME); if (handle.Success) { JSONObject data = handle.ResultData; if (data.GetField("valid").n == 1) { JSONObject history = data.GetField("data"); Logger.Instance.Log("DETAIL", "history: " + history.ToString()); handle.dataCallback(history); } else { Logger.Instance.Log("WARNING", "Server History Result Invalid"); Logger.Instance.Log("DETAIL", "data: " + data.ToString()); handle.dataCallback(null); } } }