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 = "本次教学实训总分"; break; case ProcessMode.Training: text.text = "本次培训实训总分"; break; case ProcessMode.Practice: text.text = "本次练习实训总分"; break; case ProcessMode.Assessment: text.text = "本次考核模式总分"; break; default: throw new ArgumentOutOfRangeException(); } scoreText.text=score.ToString(); } }