using System; using System.Collections; using System.Collections.Generic; using DefaultNamespace; using DefaultNamespace.ProcessMode; using MotionFramework; using TMPro; using UnityEngine; public class CompleteOverComponent : MonoBehaviour { public GameObject overGame; public TMP_Text text; public TMP_Text scoreText; void Start() { //MotionEngine.GetModule().HandleClick("前往现场");//HQB MotionEngine.GetModule().OnCompleteEvent += CompleteEvent; } private void OnDestroy() { MotionEngine.GetModule().OnCompleteEvent -= CompleteEvent; } public void CompleteEvent(int score)//HQB 改public { overGame.SetActive(true); switch (MotionEngine.GetModule().GetProcessMode()) { case ProcessMode.Teaching: text.text = "本次教学实训完成"; scoreText.gameObject.SetActive(false); break; case ProcessMode.Training: text.text = "本次培训实训总分"; scoreText.text = score.ToString(); break; case ProcessMode.Practice: text.text = "本次练习实训总分"; scoreText.text = score.ToString(); break; //case ProcessMode.Assessment://HQB考试只提交,不出分 // text.text = "本次考核模式总分"; // scoreText.text = score.ToString(); // break; default: throw new ArgumentOutOfRangeException(); } } }