You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
72 lines
2.4 KiB
72 lines
2.4 KiB
using UnityEngine; |
|
using System.Collections; |
|
using System; |
|
using System.Collections.Generic; |
|
using AX.MessageSystem; |
|
using UnityEngine.UI; |
|
|
|
public class MakeScoreItemManager : BaseItemManager { |
|
public bool MarkingOver = false; |
|
public override void SetItemPrefab() |
|
{ |
|
ItemPrefab = Resources.Load<GameObject>("UIPrefab/Examination/MakeScoreQuestionPrefab"); |
|
|
|
MessageDispatcher.AddListener("REFRESH_TIME", RefreshTime); |
|
deltaTimeBetweenLocalAndServer = TimeSpan.Zero; |
|
|
|
|
|
} |
|
public override void CheckIfShowSubmitButton() |
|
{ |
|
|
|
//exam赋完值后再调用 |
|
transform.Find("RemainTimeText/Content").GetComponent<Text>().text = |
|
exam.MarkingDeadline.ToShortDateString() + " " + exam.MarkingDeadline.ToShortTimeString(); |
|
} |
|
//选中考题打分 |
|
public void MakeScoreButton() |
|
{ |
|
//if (RemainSeconds < 0) |
|
//{ |
|
|
|
// transform.FindChild("TiShi").gameObject.SetActive(true); |
|
// transform.FindChild("TiShi").GetComponent<UITiShiManager>().Get("评分已截止!" ); |
|
// return; |
|
//} |
|
|
|
Debug.Log("MakeScore!"); |
|
ExamInfoHelpClass.loadSceneMode = ExamInfoHelpClass.LoadSceneMode.MakeScore; |
|
ExamInfoHelpClass.ExamID = exam.ID; |
|
ExamInfoHelpClass.QuestionID = question.ID; |
|
ExamInfoHelpClass.selectSceneID = (ExamInfoHelpClass.Scene)question.SceneType;//给Selected.selectSceneID赋值 |
|
CurExam = exam; |
|
CurQues = question; |
|
//SceneManager.LoadScene(sceneName);//加载考题对应的场景 |
|
MySceneManager.MyLoadScene(question.SceneType.ToString()); |
|
TimeManager.RemainSeconds = RemainSeconds; |
|
TimeManager.LastTime = DateTime.Now; |
|
TimeManager.CurExam = exam; |
|
TimeManager.CurQues = question; |
|
} |
|
|
|
void Update() |
|
{ |
|
var deltaTime = exam.MarkingDeadline - (DateTime.Now - deltaTimeBetweenLocalAndServer); |
|
RemainSeconds = (int)deltaTime.TotalSeconds; |
|
if(RemainSeconds<0) |
|
{ |
|
if (!MarkingOver) |
|
{ |
|
MarkingOver = true; |
|
transform.Find("Tip").gameObject.SetActive(true); |
|
transform.Find("Tip").GetComponent<Text>().text = "评分截止"; |
|
transform.Find("MakeScoreButton").gameObject.SetActive(false); |
|
} |
|
} |
|
} |
|
|
|
public override void CheckIfHasFile(List<QuestionInfo> items) |
|
{ |
|
|
|
} |
|
}
|
|
|