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("前往现场"); MotionEngine.GetModule().OnCompleteEvent += CompleteEvent; } private void CompleteEvent(int score) { 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: text.text = "本次考核模式总分"; scoreText.text = score.ToString(); break; default: throw new ArgumentOutOfRangeException(); } } }