ShanxiKnowledgeBase/SXElectricity Marketing 2.0/Assets/Zion/Scripts/YL/Stepeightpanl.cs

205 lines
5.2 KiB
C#

using System;
using System.Collections;
using System.Collections.Generic;
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>
/// 女충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 Image signforimage8;
/// <summary>
/// 女충4
/// </summary>
public RectTransform stepeightpanl4;
/// <summary>
/// 백도객큐
/// </summary>
public Button archivistbutton;
/// <summary>
/// 瓊刻女충
/// </summary>
public Whetherthandinpapersornot whetherthandinpapersornot;
/// <summary>
/// 백도객큐털뙤
/// </summary>
private bool archivsisp=true;
/// <summary>
/// 뒤검꼍꾸鱗
/// </summary>
private float stepeight1;
private float stepeight2;
private float stepeight3;
void Start()
{
waittobedonebutton8.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;
signforimage8.gameObject.SetActive(true);
Invoke("Getpicture2", 1.5f);
});
archivistbutton.onClick.AddListener(() =>
{
if (archivsisp)
{
Debug.Log("뒤검꼍털롸");
if (serialtoggle8.isOn)
{
ScoreManager.Instance.AddScore(1.5f);//角뤠뭅朞
stepeight1 = ScoreManager.Instance.scores[7] * 0.2f;
}
if (signforisp)
{
ScoreManager.Instance.AddScore(2);//푯澗
stepeight2 = ScoreManager.Instance.scores[7] * 0.2f;
}
ScoreManager.Instance.AddScore(9);
stepeight3 = ScoreManager.Instance.scores[7] * 0.6f;
float value = stepeight1 + stepeight2 + stepeight3;
ScoreManager.Instance.totalpoints.Add(value);
Debug.Log(ScoreManager.Instance.Score);
archivsisp = false;
}
whetherthandinpapersornot.gameObject.SetActive(true);
});
Tipspanl();
}
/// <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();
}
});
}
public void Getpicture2()
{
signforimage8.gameObject.SetActive(false);
}
/// <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()
{
}
}