This commit is contained in:
yulong 2024-05-16 08:49:39 +08:00
parent 8a823fe5f8
commit 5ba5a27dcc
5 changed files with 536 additions and 738 deletions

View File

@ -1 +1 @@
2024-04-29 13:35:53#'test://;0;7;588;Bearer%20eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImI2MDFjZTIwLWJlOTktNGQwMy1hNmVhLTMzYjY1ODkxM2E4YiJ9.JDu85hTysDmhD1WwNNXzJ0o8UtsPDH3ONnMAYXZPBxy2VhzhF51dDpPkPIRftSGO-dyZeQFCgWkU5Nj6gx1AoQ;/'|
2024-04-29 13:35:53#'test://;0,试卷id,userId,username;Bearer%20eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImI2MDFjZTIwLWJlOTktNGQwMy1hNmVhLTMzYjY1ODkxM2E4YiJ9.JDu85hTysDmhD1WwNNXzJ0o8UtsPDH3ONnMAYXZPBxy2VhzhF51dDpPkPIRftSGO-dyZeQFCgWkU5Nj6gx1AoQ;/'|

File diff suppressed because it is too large Load Diff

View File

@ -26,24 +26,27 @@ public class ReadLoginInfo : MonoBehaviour
if (File.Exists(path))
{
str = File.ReadAllText(path);
string[] data = str.Split(new char[] { '#' });
DateTime dateTime = DateTime.Parse(data[0]);
TimeSpan timeSpan = DateTime.Now - dateTime;
string[] data = str.Split(new char[] { ';' });
//DateTime dateTime = DateTime.Parse(data[0]);
//TimeSpan timeSpan = DateTime.Now - dateTime;
//if (dateTime.Second > 60)
//{
// Debug.Log("请求超时");
//}
//else
//{
string[] data2 = data[1].Split(new char[] { ';' });
Debug.Log(data2[1]);
if (data2[1]=="0")
string[] data2 = data[1].Split(new char[] { ',' });
Debug.Log(data2[0]);
if (data2[0]=="0")
{
PlayerPrefs.SetString("Name", data2[3]);
mainselect.practicebutton.onClick.Invoke();
Debug.Log("进入了");
}
else if (data2[1]=="1")
else if (data2[0]=="1")
{
Debug.Log(data2[3]);
PlayerPrefs.SetString ("Name", data2[3]);
mainselect.examinationbutton.onClick.Invoke();
Debug.Log("跳转");
}

View File

@ -1,5 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics.Contracts;
using Unity.VisualScripting;
using UnityEngine;
@ -79,7 +81,7 @@ public class Submit : MonoBehaviour
/// <summary>
/// 倒计时
/// </summary>
public Text timetext;
public Text timetext;
/// <summary>
/// 提示是否交卷页面
/// </summary>
@ -100,15 +102,37 @@ public class Submit : MonoBehaviour
/// 三个菜单按钮
/// </summary>
public GameObject electricitychargeaccounting, powersupplycontract;
/// <summary>
/// 初始化用户名
/// </summary>
public Text nametext;
/// <summary>
/// 操作步骤信息
/// </summary>
public GameObject firstcontent, secondcontent, thirdcontent, numberfourcontent, fifthcontent, sixthcontent, seventhcontent, eighthcontent;
/// <summary>
/// 初始化时间
/// </summary>
public Text loginname;
private void Awake()
{
loginname.text = DateTime.Now.ToString();
nametext.text = PlayerPrefs.GetString("Name");
Debug.Log(nametext.text);
Debug.LogError(ScoreManager.Instance.judgmentbos);
practicesprite = Resources.Load<Sprite>("UIpanel/练习模式");
examinesprite = Resources.Load<Sprite>("UIpanel/考试模式");
contract.isOn = true;
if (ScoreManager.Instance.judgmentbos)
{
firstcontent.SetActive(false);
secondcontent.SetActive(false);
thirdcontent.SetActive(false);
numberfourcontent.SetActive(false);
fifthcontent.SetActive(false);
sixthcontent.SetActive(false);
seventhcontent.SetActive(false);
eighthcontent.SetActive(false);
practicemode.sprite = examinesprite;
electricitychargeaccounting.SetActive(false);
powersupplycontract.SetActive(false);
@ -178,10 +202,10 @@ public class Submit : MonoBehaviour
{
coolingimage.fillAmount = 1 - (skilltimer / examinetimer);
skilltimer += Time.deltaTime;
timer-= Time.deltaTime;
warntext.text = timer.ToString("0")+"秒后自动退出系统";
timer -= Time.deltaTime;
warntext.text = timer.ToString("0") + "秒后自动退出系统";
timetext.text = timer.ToString("0");
if (coolingimage.fillAmount==0)
if (coolingimage.fillAmount == 0)
{
// 退出应用程序
#if UNITY_EDITOR

View File

@ -254,6 +254,10 @@ public class Thethirdsteppanl : MonoBehaviour
{
ToggleValueChanged(togglepromise);
});
notoggle.onValueChanged.AddListener(delegate
{
ToggleValueChanged2(notoggle);
});
messagebutton.onClick.AddListener(() =>
{
thirdoperationpanl5.gameObject.SetActive(false);
@ -266,7 +270,6 @@ public class Thethirdsteppanl : MonoBehaviour
});
tapbutton.onClick.AddListener(() =>
{
ScoreManager.Instance.AddScore(2);
thirdoperationpanl7.gameObject.SetActive(false);
thirdoperationpanl8.gameObject.SetActive(true);
});
@ -307,7 +310,7 @@ public class Thethirdsteppanl : MonoBehaviour
if (glideinput1.options[glideinput1.value].text == "否" && glideinput2.options[glideinput2.value].text == "否" && glideinput2.options[glideinput2.value].text == "否"
&& glideinput2.options[glideinput2.value].text == "否" && cancelisp)
{
ScoreManager.Instance.AddScore(3);
ScoreManager.Instance.AddScore(4);
Debug.LogError(ScoreManager.Instance.Score);
cancelisp = false;
}
@ -347,13 +350,13 @@ public class Thethirdsteppanl : MonoBehaviour
{
if (ison)
{
ScoreManager.Instance.AddScore(2);
ScoreManager.Instance.AddScore(3);
thirdoperationpanl9.gameObject.SetActive(false);
thirdoperationpanl10.gameObject.SetActive(true);
}
else
{
ScoreManager.Instance.SubtractScore(2);
ScoreManager.Instance.SubtractScore(3);
}
});
electricitytoggle2.onValueChanged.AddListener((ison) =>
@ -472,6 +475,19 @@ public class Thethirdsteppanl : MonoBehaviour
thirdoperationpanl5.gameObject.SetActive(false);
}
}
public void ToggleValueChanged2(Toggle toggle)
{
if (toggle.isOn)
{
thirdoperationpanl4.gameObject.SetActive(false);
thirdoperationpanl5.gameObject.SetActive(true);
}
else
{
thirdoperationpanl4.gameObject.SetActive(true);
thirdoperationpanl5.gameObject.SetActive(false);
}
}
/// <summary>
/// 用枚举判断选择了那个选项框
/// </summary>