void AddFbFriendSuccess(JSONObject data) { ErrorCode.USER errorCode = (ErrorCode.USER)data.GetInt("errorCode"); if (errorCode == ErrorCode.USER.NULL) { Debug.Log("AddFbFriendSuccess--------- " + data.ToString()); } else { HUDManager.Instance.AddFlyText(errorCode.ToString(), Vector3.zero, 40, Color.red); } }
void ClaimInboxRewardSuccess(JSONObject data) { PopupManager.Instance.CloseLoadingPopup(); ErrorCode.USER errorCode = (ErrorCode.USER)data.GetInt("errorCode"); if (errorCode == ErrorCode.USER.NULL) { if (PopupManager.Instance != null && PopupManager.Instance.PopupInbox != null) { PopupManager.Instance.PopupInbox.ClaimRewardSuccess(data); } } else { HUDManager.Instance.AddFlyText(errorCode.ToString(), Vector3.zero, 40, Color.red); } }
void AddFriendSuccess(JSONObject data) { ErrorCode.USER errorCode = (ErrorCode.USER)data.GetInt("errorCode"); if (errorCode == ErrorCode.USER.NULL) { string fUsername = data.GetString("fUsername"); // AccountManager.Instance.friends.Add(fUsername); if (PopupManager.Instance.PopupUserInfo != null) { PopupManager.Instance.PopupUserInfo.AddFriendSuccess(fUsername); } } else { HUDManager.Instance.AddFlyText(errorCode.ToString(), Vector3.zero, 40, Color.red); } }
void ClaimDailyRewardSuccess(JSONObject data) { ErrorCode.USER errorCode = (ErrorCode.USER)data.GetInt("errorCode"); if (errorCode == ErrorCode.USER.NULL) { Debug.Log("ClaimDailyRewardSuccess-- " + data.ToString()); AccountManager.Instance.lastClaimedDaily = data.GetLong("lastDaily"); AccountManager.Instance.UpdateUserCash(data.GetLong("cash")); if (ScreenManager.Instance.SelectGameScreen != null) { ScreenManager.Instance.SelectGameScreen.ClaimedDailyRewardCallback(); } } else { Debug.Log("ClaimDailyRewardFail-- " + data.ToString()); HUDManager.Instance.AddFlyText(errorCode.ToString(), Vector3.zero, 40, Color.red); } }
void LoadUserInfoSuccess(JSONObject data) { PopupManager.Instance.HideLoadingIndicator(); JSONObject user = data.GetObject("user"); if (user.ContainsKey("errorCode")) { ErrorCode.USER errorCode = (ErrorCode.USER)user.GetInt("errorCode"); HUDManager.Instance.AddFlyText(errorCode.ToString(), Vector3.zero, 40, Color.red); } else { if (PopupManager.Instance.PopupUserInfo != null) { PopupManager.Instance.PopupUserInfo.DisplayUserInfo(user); } else { PopupUserInfo.SetUser(user); } } }