55 lines
1.4 KiB
C#
55 lines
1.4 KiB
C#
using DefaultNamespace.ProcessMode;
|
|
using DefaultNamespace;
|
|
using MotionFramework;
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.SocialPlatforms.Impl;
|
|
using UnityEngine.UI;
|
|
using TMPro;
|
|
|
|
public class SubmitBtn : MonoBehaviour
|
|
{
|
|
public CompleteOverComponent CompleteOverComponent;
|
|
public GameObject SubmitPlane;
|
|
public TMP_Text submitBtnText;
|
|
|
|
public void PressSubmitBtn()
|
|
{
|
|
switch (MotionEngine.GetModule<DataConfigManager>().GetProcessMode())
|
|
{
|
|
case ProcessMode.Practice:
|
|
CompleteOverComponent.CompleteEvent(MotionEngine.GetModule<AnimationProcessManager>().CalculateTotalScore());
|
|
break;
|
|
case ProcessMode.Assessment:
|
|
SubmitPlane.SetActive(true);
|
|
break;
|
|
default:
|
|
throw new ArgumentOutOfRangeException();
|
|
}
|
|
|
|
}
|
|
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
|
|
private void OnEnable()
|
|
{
|
|
Button btn = GetComponent<Button>();
|
|
if (MotionEngine.GetModule<DataConfigManager>().GetProcessMode() == ProcessMode.Assessment)
|
|
submitBtnText.text = "½»¾í";
|
|
else if (MotionEngine.GetModule<DataConfigManager>().GetProcessMode() == ProcessMode.Practice)
|
|
submitBtnText.text = "Ìá½»";
|
|
}
|
|
}
|