This commit is contained in:
parent
7ab75d4907
commit
8f0fc78f3e
|
|
@ -44,17 +44,22 @@ public class ScoreManager : MonoBehaviour
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="subjectid"></param>
|
/// <param name="subjectid"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public float GetScore(int subjectid)
|
public ScoreModel GetScore(int subjectid)
|
||||||
{
|
{
|
||||||
return scoreSubjectList.Find(a=>a.schemeId== subjectid).GetTotalScore();
|
ScoreBase sb=scoreSubjectList.Find(a=>a.schemeId== subjectid);
|
||||||
}
|
ScoreModel scoreModel = new ScoreModel();
|
||||||
/// <summary>
|
scoreModel.score= sb.GetTotalScore();
|
||||||
/// 获取分步骤得分详情
|
var step=sb.GetStepScore();
|
||||||
/// </summary>
|
foreach (var item in step)
|
||||||
/// <param name="subjectid"></param>
|
{
|
||||||
/// <returns></returns>
|
ScoreInfo scoreInfo = new ScoreInfo();
|
||||||
public Dictionary<int, ScoreSubjectStep> GetStepScore(int subjectid)
|
scoreInfo.pointScore = item.Value.currentScore;
|
||||||
{
|
scoreInfo.maxScore = item.Value.maxScore;
|
||||||
return scoreSubjectList.Find(a => a.schemeId == subjectid).GetStepScore();
|
scoreInfo.point = item.Value.step.subProcessName;
|
||||||
|
scoreInfo.pointInfo = item.Value.step.tips;
|
||||||
|
scoreModel.pointList.Add(scoreInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
return scoreModel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ public class ScoreSubjectStep
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ²½Öè
|
/// ²½Öè
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public D_SubProcess setp;
|
public D_SubProcess step;
|
||||||
|
|
||||||
public ScoreSubjectStep(int subProcessId,float maxScore,bool isOneVoteVeto=false)
|
public ScoreSubjectStep(int subProcessId,float maxScore,bool isOneVoteVeto=false)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ public class Score_1002 : ScoreBase
|
||||||
|
|
||||||
for (int i = 0; i < steps.Count; i++)
|
for (int i = 0; i < steps.Count; i++)
|
||||||
{
|
{
|
||||||
steps[i].setp = dsteps[i];
|
steps[i].step = dsteps[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
//清理缓存
|
//清理缓存
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,11 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class ScoreModel
|
public class ScoreModel
|
||||||
{
|
{
|
||||||
public string time;
|
public string time;
|
||||||
public string score;
|
public float score;
|
||||||
public List<ScoreInfo> pointList = new List<ScoreInfo>();
|
public List<ScoreInfo> pointList = new List<ScoreInfo>();
|
||||||
}
|
}
|
||||||
[Serializable]
|
[Serializable]
|
||||||
|
|
@ -14,5 +13,12 @@ public class ScoreInfo
|
||||||
{
|
{
|
||||||
public string point;
|
public string point;
|
||||||
public string pointInfo;
|
public string pointInfo;
|
||||||
public string pointScore;
|
/// <summary>
|
||||||
|
/// 得分
|
||||||
|
/// </summary>
|
||||||
|
public float pointScore;
|
||||||
|
/// <summary>
|
||||||
|
/// 总分
|
||||||
|
/// </summary>
|
||||||
|
public float maxScore;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue