添加分数获取
This commit is contained in:
parent
8f0fc78f3e
commit
066c238fea
|
|
@ -40,7 +40,7 @@ public class ScoreManager : MonoBehaviour
|
||||||
scoreSubjectList.Find(a => a.systemId == systemctlid && a.schemeId == schemeid)?.CheckScore(triggerName, para);
|
scoreSubjectList.Find(a => a.systemId == systemctlid && a.schemeId == schemeid)?.CheckScore(triggerName, para);
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取总分
|
/// 根据方案/科目ID获取总分
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="subjectid"></param>
|
/// <param name="subjectid"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
|
@ -62,4 +62,5 @@ public class ScoreManager : MonoBehaviour
|
||||||
|
|
||||||
return scoreModel;
|
return scoreModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,11 +9,11 @@ public class UI_PracticeInfoItem : BaseItem
|
||||||
public TextMeshProUGUI point;
|
public TextMeshProUGUI point;
|
||||||
public TextMeshProUGUI pointInfo;
|
public TextMeshProUGUI pointInfo;
|
||||||
public TextMeshProUGUI score;
|
public TextMeshProUGUI score;
|
||||||
public void Init(string _number,string _point,string _pointInfo,string _score)
|
public void Init(int count, ScoreInfo sInfo)
|
||||||
{
|
{
|
||||||
number.text = _number;
|
number.text = count.ToString();
|
||||||
point.text = _point;
|
point.text = sInfo.point;
|
||||||
pointInfo.text = _pointInfo;
|
pointInfo.text = sInfo.pointInfo;
|
||||||
score.text = _score;
|
score.text = $"<color=#00EEE6>{sInfo.pointScore}<color>/{sInfo.maxScore}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,11 +10,17 @@ public class UI_PracticeCompletedPanel : BasePanel
|
||||||
public RectTransform content;
|
public RectTransform content;
|
||||||
public void Init()
|
public void Init()
|
||||||
{
|
{
|
||||||
//ScoreManager.instance.GetScore();
|
ScoreModel scoreModel = ScoreManager.instance.GetScore(GameManager.RunModelMgr.schemeID);
|
||||||
//ScoreManager.instance.GetStepScore();
|
|
||||||
UI_PracticeInfoItem temp = Instantiate(piiPrefab, content);
|
for (int i = 0; scoreModel.pointList.Count > 0; i++)
|
||||||
|
{
|
||||||
|
int index = i;
|
||||||
|
UI_PracticeInfoItem temp = Instantiate(piiPrefab, content);
|
||||||
|
temp.Init(index + 1, scoreModel.pointList[index]);
|
||||||
|
}
|
||||||
|
|
||||||
|
GetControl<TextMeshProUGUI>("ScoreRes").text = scoreModel.score.ToString();
|
||||||
GetControl<TextMeshProUGUI>("UsedTimesRes").text = "00:555";
|
GetControl<TextMeshProUGUI>("UsedTimesRes").text = "00:555";
|
||||||
GetControl<TextMeshProUGUI>("ScoreRes").text = "123";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnClick(string btnName)
|
protected override void OnClick(string btnName)
|
||||||
|
|
@ -28,10 +34,10 @@ public class UI_PracticeCompletedPanel : BasePanel
|
||||||
GameManager.Instance.ShowUIPanelAndLoadScene(true);
|
GameManager.Instance.ShowUIPanelAndLoadScene(true);
|
||||||
break;
|
break;
|
||||||
case "closeBtn":
|
case "closeBtn":
|
||||||
|
GameManager.UIMgr.HidePanel<UI_PracticeCompletedPanel>();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
GameManager.UIMgr.HidePanel<UI_PracticeCompletedPanel>();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue