216 lines
5.4 KiB
C#
216 lines
5.4 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Xml.Serialization;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class Signforpanl : MonoBehaviour
|
|
{
|
|
/// <summary>
|
|
/// 签收页面
|
|
/// </summary>
|
|
public RectTransform signforpanl;
|
|
/// <summary>
|
|
/// 文本传递的内容
|
|
/// </summary>
|
|
public Text contenttext1;
|
|
public Text contenttext2;
|
|
public Text contenttext3;
|
|
/// <summary>
|
|
/// 签收确认按钮
|
|
/// </summary>
|
|
public Button isbutton;
|
|
/// <summary>
|
|
/// 否定签收按钮
|
|
/// </summary>
|
|
public Button nobutton;
|
|
/// <summary>
|
|
/// 显示查看信息页面
|
|
/// </summary>
|
|
public RectTransform controlspanl1;
|
|
/// <summary>
|
|
/// 传递文本内容
|
|
/// </summary>
|
|
public Text contenttext4, contenttext5, contenttext6;
|
|
/// <summary>
|
|
/// 查看人员信息按钮
|
|
/// </summary>
|
|
public Button viewbutton;
|
|
/// <summary>
|
|
/// 确认按钮
|
|
/// </summary>
|
|
public Button verifybutton2;
|
|
/// <summary>
|
|
/// 遮挡名字图片
|
|
/// </summary>
|
|
public Image zhednag;
|
|
/// <summary>
|
|
/// 显示名字文本
|
|
/// </summary>
|
|
public Text nametext;
|
|
/// <summary>
|
|
/// 派工按钮
|
|
/// </summary>
|
|
public Button sendworkbutton;
|
|
/// <summary>
|
|
/// 查找人员信息页面
|
|
/// </summary>
|
|
public RectTransform controlspanl2;
|
|
/// <summary>
|
|
/// 人员输入列表
|
|
/// </summary>
|
|
public InputField inputname;
|
|
/// <summary>
|
|
/// 人员查询按钮
|
|
/// </summary>
|
|
public Button inquirebuton;
|
|
/// <summary>
|
|
/// 高亮选择
|
|
/// </summary>
|
|
public Toggle Toggle1, Toggle2, Toggle3, Toggle4, Toggle5;
|
|
/// <summary>
|
|
/// 确认按钮
|
|
/// </summary>
|
|
public Button okbutton;
|
|
/// <summary>
|
|
/// 显示人员信息面板
|
|
/// </summary>
|
|
public RectTransform controlspanl3;
|
|
/// <summary>
|
|
/// 点击高亮显示圆圈
|
|
/// </summary>
|
|
public Image checkimage;
|
|
/// <summary>
|
|
/// 点击显示按钮
|
|
/// </summary>
|
|
public Button checkbutton;
|
|
/// <summary>
|
|
/// 点击只得一次分
|
|
/// </summary>
|
|
private bool checkisp = true;
|
|
/// <summary>
|
|
/// 点击确认按钮
|
|
/// </summary>
|
|
public Button verifybutton;
|
|
/// <summary>
|
|
/// 第三步步骤显示
|
|
/// </summary>
|
|
public RectTransform thethirdsteppanl;
|
|
void Start()
|
|
{
|
|
verifybutton2.onClick.AddListener(() =>
|
|
{
|
|
controlspanl2.gameObject.SetActive(false);
|
|
controlspanl1.gameObject.SetActive(true);
|
|
});
|
|
inquirebuton.onClick.AddListener(() =>
|
|
{
|
|
if (inputname.text.Contains("原"))
|
|
{
|
|
controlspanl2.gameObject.SetActive(false);
|
|
controlspanl3.gameObject.SetActive(true);
|
|
}
|
|
});
|
|
checkbutton.onClick.AddListener(() =>
|
|
{
|
|
if (checkisp)
|
|
{
|
|
ScoreManager.Instance.AddScore(6);
|
|
Debug.Log(ScoreManager.Instance.Score);
|
|
checkimage.gameObject.SetActive(true);
|
|
checkisp = false;
|
|
}
|
|
else
|
|
{
|
|
ScoreManager.Instance.SubtractScore(6);
|
|
Debug.Log(ScoreManager.Instance.Score);
|
|
checkimage.gameObject.SetActive(false);
|
|
checkisp = true;
|
|
}
|
|
});
|
|
verifybutton.onClick.AddListener(() =>
|
|
{
|
|
controlspanl3.gameObject.SetActive(false );
|
|
zhednag.gameObject.SetActive(true);
|
|
nametext.gameObject.SetActive(true);
|
|
controlspanl1.gameObject.SetActive(true);
|
|
});
|
|
sendworkbutton.onClick.AddListener(() =>
|
|
{
|
|
controlspanl1.gameObject.SetActive(false);
|
|
thethirdsteppanl.gameObject.SetActive(true);
|
|
});
|
|
okbutton.onClick.AddListener(() =>
|
|
{
|
|
controlspanl2.gameObject.SetActive(false);
|
|
controlspanl1.gameObject.SetActive(true);
|
|
});
|
|
}
|
|
/// <summary>
|
|
/// 传递参数
|
|
/// </summary>
|
|
/// <param name="str1"></param>
|
|
/// <param name="str2"></param>
|
|
/// <param name="str3"></param>
|
|
public void Passbyvalue(string str1,string str2,string str3)
|
|
{
|
|
contenttext1.text = str1;
|
|
contenttext2.text = str2;
|
|
contenttext3.text = str3;
|
|
}
|
|
/// <summary>
|
|
/// 准备执行按钮操作
|
|
/// </summary>
|
|
public void EquippingItems(Action action)
|
|
{
|
|
isbutton.onClick.AddListener(() =>
|
|
{
|
|
action?.Invoke();
|
|
});
|
|
}
|
|
public void CanceItems(Action action)
|
|
{
|
|
nobutton.onClick.AddListener(() =>
|
|
{
|
|
action?.Invoke();
|
|
});
|
|
}
|
|
/// <summary>
|
|
/// 初始化文本
|
|
/// </summary>
|
|
/// <param name="str1"></param>
|
|
/// <param name="str2"></param>
|
|
/// <param name="str3"></param>
|
|
public void Getvalue(string str1, string str2, string str3)
|
|
{
|
|
contenttext4.text = str1;
|
|
contenttext5.text = str2;
|
|
contenttext6.text = str3;
|
|
}
|
|
public void EquippingItems2(Action action)
|
|
{
|
|
viewbutton.onClick.AddListener(() =>
|
|
{
|
|
action?.Invoke();
|
|
});
|
|
}
|
|
/// <summary>
|
|
/// 初始化页面
|
|
/// </summary>
|
|
public void Getrestore2()
|
|
{
|
|
inputname.text = null;
|
|
Toggle1.isOn = false;
|
|
Toggle2.isOn = false;
|
|
Toggle3.isOn = false;
|
|
Toggle4.isOn = false;
|
|
Toggle5.isOn = false;
|
|
checkimage.gameObject.SetActive(false);
|
|
}
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|