|
@@ -1,4 +1,5 @@
|
|
using System.Collections.Generic;
|
|
using System.Collections.Generic;
|
|
|
|
+using System.Linq;
|
|
using ET;
|
|
using ET;
|
|
using FairyGUI;
|
|
using FairyGUI;
|
|
using Hutool;
|
|
using Hutool;
|
|
@@ -297,7 +298,10 @@ namespace GFGGame
|
|
}
|
|
}
|
|
private void UpdateJoinList()
|
|
private void UpdateJoinList()
|
|
{
|
|
{
|
|
- _memberIds = new List<long>(LeagueDataManager.Instance.ListAnsweringDatas.Keys);
|
|
|
|
|
|
+ _memberIds = LeagueDataManager.Instance.ListAnsweringDatas
|
|
|
|
+ .OrderByDescending(pair => pair.Value) // 按值(答题数量)降序排序
|
|
|
|
+ .Select(pair => pair.Key)
|
|
|
|
+ .ToList();
|
|
_ui.m_listJoin.numItems = _memberIds.Count;
|
|
_ui.m_listJoin.numItems = _memberIds.Count;
|
|
_ui.m_txtJoinNum.text = string.Format("当前参与人员:{0}/{1}", _memberIds.Count, LeagueDataManager.Instance.LeagueData.LeagueMemberDatas.Count);
|
|
_ui.m_txtJoinNum.text = string.Format("当前参与人员:{0}/{1}", _memberIds.Count, LeagueDataManager.Instance.LeagueData.LeagueMemberDatas.Count);
|
|
}
|
|
}
|
|
@@ -323,10 +327,10 @@ namespace GFGGame
|
|
|
|
|
|
item.target.title = string.Format("{0}.{1}", data, cfg.answerArr[index]);
|
|
item.target.title = string.Format("{0}.{1}", data, cfg.answerArr[index]);
|
|
//测试 正确答案
|
|
//测试 正确答案
|
|
- // if (data == int.Parse(cfg.answerCorrect))
|
|
|
|
- // {
|
|
|
|
- // item.target.title = string.Format("{0}.{1} 正确", data, cfg.answerArr[index]);
|
|
|
|
- //}
|
|
|
|
|
|
+ if (data == int.Parse(cfg.answerCorrect))
|
|
|
|
+ {
|
|
|
|
+ item.target.title = string.Format("{0}.{1} 正确", data, cfg.answerArr[index]);
|
|
|
|
+ }
|
|
|
|
|
|
string myAnswer = LeagueDataManager.Instance.LastAnswerRoleData.MyAnswer;
|
|
string myAnswer = LeagueDataManager.Instance.LastAnswerRoleData.MyAnswer;
|
|
bool isAnswer = !string.IsNullOrEmpty(LeagueDataManager.Instance.LastAnswerRoleData.MyAnswer) && LeagueDataManager.Instance.LastAnswerRoleData.LastQuestionId == LeagueDataManager.Instance.GetNumeriValue(LeagueNumericType.LeagueQuestionId);
|
|
bool isAnswer = !string.IsNullOrEmpty(LeagueDataManager.Instance.LastAnswerRoleData.MyAnswer) && LeagueDataManager.Instance.LastAnswerRoleData.LastQuestionId == LeagueDataManager.Instance.GetNumeriValue(LeagueNumericType.LeagueQuestionId);
|