264 lines
6.9 KiB
C#
264 lines
6.9 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using Unity.VisualScripting;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class Stepeightpanl : MonoBehaviour
|
|
{
|
|
/// <summary>
|
|
/// 놓迦뺏女충
|
|
/// </summary>
|
|
public RectTransform stepeightpanl;
|
|
/// <summary>
|
|
/// 女충1
|
|
/// </summary>
|
|
public RectTransform stepeightpanl1;
|
|
/// <summary>
|
|
/// 릿齡긍뵀
|
|
/// </summary>
|
|
public InputField inputid8;
|
|
/// <summary>
|
|
/// 덤곗묏데객큐
|
|
/// </summary>
|
|
public Button waittobedonebutton8;
|
|
/// <summary>
|
|
/// 덤곗묏데
|
|
/// </summary>
|
|
public Button Backtodo;
|
|
/// <summary>
|
|
/// 女충2
|
|
/// </summary>
|
|
public RectTransform stepeightpanl2;
|
|
/// <summary>
|
|
/// 渴흙묏데긍뵀
|
|
/// </summary>
|
|
public InputField inputfid8;
|
|
/// <summary>
|
|
/// 꿴璂묏데객큐
|
|
/// </summary>
|
|
public Button inquirebutton8;
|
|
/// <summary>
|
|
/// 女충3
|
|
/// </summary>
|
|
public RectTransform stepeightpanl3;
|
|
/// <summary>
|
|
/// 뭅朞멕좋朞嶝
|
|
/// </summary>
|
|
public Toggle serialtoggle8;
|
|
/// <summary>
|
|
/// 뭅朞暠튬
|
|
/// </summary>
|
|
public Image serialimage8;
|
|
/// <summary>
|
|
/// 북谿跨獨백도객큐
|
|
/// </summary>
|
|
public Button recyclebutton8;
|
|
/// <summary>
|
|
/// 푯澗객큐
|
|
/// </summary>
|
|
public Button signforbutton8;
|
|
/// <summary>
|
|
/// 푯澗객큐역밑
|
|
/// </summary>
|
|
private bool signforisp = false;
|
|
/// <summary>
|
|
/// 북谿푯澗냥묘暠튬
|
|
/// </summary>
|
|
public Text Signfortext;
|
|
/// <summary>
|
|
/// 女충4
|
|
/// </summary>
|
|
public RectTransform stepeightpanl4;
|
|
/// <summary>
|
|
/// 백도객큐
|
|
/// </summary>
|
|
public Button archivistbutton;
|
|
/// <summary>
|
|
/// 瓊刻女충
|
|
/// </summary>
|
|
public Whetherthandinpapersornot whetherthandinpapersornot;
|
|
/// <summary>
|
|
/// 백도객큐털뙤
|
|
/// </summary>
|
|
private bool archivsisp = true;
|
|
/// <summary>
|
|
/// 瓊슥족構瓊今
|
|
/// </summary>
|
|
public Text Completetext;
|
|
|
|
void Start()
|
|
{
|
|
waittobedonebutton8.onClick.AddListener(() =>
|
|
{
|
|
|
|
archivsisp = true;
|
|
stepeightpanl1.gameObject.SetActive(false);
|
|
stepeightpanl2.gameObject.SetActive(true);
|
|
});
|
|
Backtodo.onClick.AddListener(() =>
|
|
{
|
|
archivsisp = true;
|
|
stepeightpanl1.gameObject.SetActive(false);
|
|
stepeightpanl2.gameObject.SetActive(true);
|
|
});
|
|
inquirebutton8.onClick.AddListener(() =>
|
|
{
|
|
stepeightpanl2.gameObject.SetActive(false);
|
|
stepeightpanl3.gameObject.SetActive(true);
|
|
});
|
|
serialtoggle8.onValueChanged.AddListener(delegate
|
|
{
|
|
Getpicture(serialtoggle8);
|
|
});
|
|
recyclebutton8.onClick.AddListener(() =>
|
|
{
|
|
stepeightpanl3.gameObject.SetActive(false);
|
|
stepeightpanl4.gameObject.SetActive(true);
|
|
});
|
|
signforbutton8.onClick.AddListener(() =>
|
|
{
|
|
signforisp = true;
|
|
Signfortext.text = "푯澗냥묘";
|
|
_ = Closeprompt(Signfortext);
|
|
});
|
|
archivistbutton.onClick.AddListener(() =>
|
|
{
|
|
if (ScoreManager.Instance.Subject == Subject.Performanceexercise ||
|
|
ScoreManager.Instance.Subject == Subject.Electricchargeexercise ||
|
|
ScoreManager.Instance.Subject == Subject.Aluminoelectricexercise)
|
|
{
|
|
Completetext.text = "족構綠供냥헝瓊슥족構";
|
|
_ = Closeprompt(Completetext);
|
|
}
|
|
if (archivsisp)
|
|
{
|
|
Debug.Log("뒤검꼍털롸");
|
|
if (ScoreManager.Instance.Subject == Subject.Performanceexercise ||
|
|
ScoreManager.Instance.Subject == Subject.Electricchargeexercise ||
|
|
ScoreManager.Instance.Subject == Subject.Aluminoelectricexercise)
|
|
{
|
|
Practicescore8();
|
|
}
|
|
if (ScoreManager.Instance.Subject == Subject.Performanceexamination)
|
|
{
|
|
Judgmentstep8();
|
|
}
|
|
Debug.Log(ScoreManager.Instance.Score);
|
|
archivsisp = false;
|
|
}
|
|
if (ScoreManager.Instance.Subject == Subject.Performanceexamination)
|
|
{
|
|
whetherthandinpapersornot.gameObject.SetActive(true);
|
|
}
|
|
});
|
|
Tipspanl();
|
|
}
|
|
/// <summary>
|
|
/// 족構꼍朧돤롸
|
|
/// </summary>
|
|
private void Practicescore8()
|
|
{
|
|
if (serialtoggle8.isOn)
|
|
{
|
|
ScoreManager.Instance.AddScore(2.5f);//角뤠뭅朞
|
|
}
|
|
if (signforisp)
|
|
{
|
|
ScoreManager.Instance.AddScore(2.5f);//푯澗
|
|
}
|
|
ScoreManager.Instance.AddScore(7.5f);
|
|
}
|
|
public async Task<Text> Closeprompt(Text text)
|
|
{
|
|
await Task.Delay(1500);
|
|
text.text = null;
|
|
return text;
|
|
}
|
|
/// <summary>
|
|
/// 옘桿꼍朧돤롸
|
|
/// </summary>
|
|
private void Judgmentstep8()
|
|
{
|
|
float score = 0f;
|
|
string str;
|
|
if (serialtoggle8.isOn)
|
|
{
|
|
score += (float.Parse(ScoreManager.Instance.totalpoints[7]) * 0.2f);
|
|
}
|
|
if (signforisp)
|
|
{
|
|
score += (float.Parse(ScoreManager.Instance.totalpoints[7]) * 0.2f);
|
|
}
|
|
score += (float.Parse(ScoreManager.Instance.totalpoints[7]) * 0.6f);
|
|
if ((score - Mathf.Floor(score)) < 0.001f)
|
|
{
|
|
str = score.ToString();
|
|
}
|
|
else
|
|
{
|
|
str = score.ToString("f2");
|
|
}
|
|
ScoreManager.Instance.Honourscores[7] = float.Parse(str);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 瓊刻角뤠슥얩女충
|
|
/// </summary>
|
|
private void Tipspanl()
|
|
{
|
|
whetherthandinpapersornot.Cancel(() =>
|
|
{
|
|
whetherthandinpapersornot.gameObject.SetActive(false);
|
|
});
|
|
whetherthandinpapersornot.Submitbon(() =>
|
|
{
|
|
if (ScoreManager.Instance.Subject == Subject.Performanceexamination)
|
|
{
|
|
Submit game1 = GameObject.Find("MianCanvas").GetComponent<Submit>();
|
|
game1.Handinanexaminationpaper1();
|
|
}
|
|
});
|
|
}
|
|
|
|
/// <summary>
|
|
/// 鞫刻暠튬
|
|
/// </summary>
|
|
/// <param name="toggle"></param>
|
|
public void Getpicture(Toggle toggle)
|
|
{
|
|
if (toggle.isOn)
|
|
{
|
|
|
|
serialimage8.gameObject.SetActive(true);
|
|
}
|
|
else
|
|
{
|
|
|
|
serialimage8.gameObject.SetActive(false);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 놓迦뺏女충렘랬
|
|
/// </summary>
|
|
public void Getpage8()
|
|
{
|
|
stepeightpanl.gameObject.SetActive(true);
|
|
}
|
|
/// <summary>
|
|
/// 돤롸놓迦뺏꼍朧
|
|
/// </summary>
|
|
public void Getrestore8()
|
|
{
|
|
inputfid8.text = null;
|
|
serialtoggle8.isOn = false;
|
|
serialimage8.gameObject.SetActive(false);
|
|
}
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|