ShanxiKnowledgeBase/SXElectricityInformationAcq.../Assets/taoruiqi/CompleteOverComponent.cs

57 lines
1.6 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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<AnimationProcessManager>().HandleClick("前往现场");
MotionEngine.GetModule<AnimationProcessManager>().OnCompleteEvent += CompleteEvent;
}
private void OnDestroy()
{
MotionEngine.GetModule<AnimationProcessManager>().OnCompleteEvent -= CompleteEvent;
}
public void CompleteEvent(int score)//HQB 改public
{
overGame.SetActive(true);
switch (MotionEngine.GetModule<DataConfigManager>().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();
}
}
}