public string GetRandomLanguageConfig(string prefix) { string key = string.Format("{0}{1}", prefix, I18Mgr.S.langugePrefix); var data = TDSocialAdapterTable.GetData(key + "_Count"); if (data == null) { key = prefix; data = TDSocialAdapterTable.GetData(key + "_Count"); } if (data == null) { Log.e("Not Find RandomLanguageConfig:" + prefix); return(null); } int count = Helper.String2Int(data.param1); int index = RandomHelper.Range(0, count); key = string.Format("{0}_{1}", key, index); data = TDSocialAdapterTable.GetData(key); if (data == null) { Log.e("Invalid Count Config For RandomLanguageConfig:" + prefix); return(null); } return(data.param1); }
public void ReportScore(string leaderboard, long score) { if (!m_GameCenterState) { return; } if (string.IsNullOrEmpty(leaderboard)) { Log.e("Invalid Leaderboard."); return; } var data = TDSocialAdapterTable.GetData(leaderboard); if (data == null) { Log.w("Not Find Leaderboard Data:" + leaderboard); return; } if (string.IsNullOrEmpty(data.param1)) { Log.w("Invalid GameCenter leaderboard Config"); return; } Social.ReportScore(score, data.param1, OnReportScoreEvent); }