180 lines
4.4 KiB
C#
180 lines
4.4 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class Stepsixpanl : MonoBehaviour
|
|
{
|
|
/// <summary>
|
|
/// 初始化页面
|
|
/// </summary>
|
|
public RectTransform stepsixpanl;
|
|
/// <summary>
|
|
/// 页面1
|
|
/// </summary>
|
|
public RectTransform stepsixpanl1;
|
|
/// <summary>
|
|
/// 待办按钮
|
|
/// </summary>
|
|
public Button waittobebutton6;
|
|
/// <summary>
|
|
/// 页面2
|
|
/// </summary>
|
|
public RectTransform stepsixpanl2;
|
|
/// <summary>
|
|
/// 输入编号
|
|
/// </summary>
|
|
public InputField inputfid6;
|
|
/// <summary>
|
|
/// 查询按钮
|
|
/// </summary>
|
|
public Button inquirebutton6;
|
|
/// <summary>
|
|
/// 高亮选择
|
|
/// </summary>
|
|
public Toggle serialtoggle6;
|
|
/// <summary>
|
|
/// 图片选择
|
|
/// </summary>
|
|
public Image serialimage6;
|
|
/// <summary>
|
|
/// 合同违约审批按钮
|
|
/// </summary>
|
|
public Button examinebutton6;
|
|
/// <summary>
|
|
/// 页面3
|
|
/// </summary>
|
|
public RectTransform stepsixpanl3;
|
|
/// <summary>
|
|
/// 确认签收按钮
|
|
/// </summary>
|
|
public Button yesbutton;
|
|
/// <summary>
|
|
/// 确认按钮开关
|
|
/// </summary>
|
|
private bool yesisp = false;
|
|
/// <summary>
|
|
/// 取消签收按钮
|
|
/// </summary>
|
|
public Button nobutton;
|
|
/// <summary>
|
|
/// 页面4
|
|
/// </summary>
|
|
public RectTransform stepsixpanl4;
|
|
/// <summary>
|
|
/// 选择通过
|
|
/// </summary>
|
|
public Toggle passtoggle6;
|
|
/// <summary>
|
|
/// 选择不通过
|
|
/// </summary>
|
|
public Toggle nopasstoggle6;
|
|
/// <summary>
|
|
/// 发送按钮
|
|
/// </summary>
|
|
public Button sendbutton6;
|
|
/// <summary>
|
|
/// 第六步判分
|
|
/// </summary>
|
|
private float stepsix1;
|
|
private float stepsix2;
|
|
private float stepsix3;
|
|
void Start()
|
|
{
|
|
waittobebutton6.onClick.AddListener(() =>
|
|
{
|
|
|
|
stepsixpanl1.gameObject.SetActive(false);
|
|
stepsixpanl2.gameObject.SetActive(true);
|
|
});
|
|
serialtoggle6.onValueChanged.AddListener(delegate
|
|
{
|
|
Gettoggle(serialtoggle6);
|
|
});
|
|
examinebutton6.onClick.AddListener(() =>
|
|
{
|
|
stepsixpanl2.gameObject.SetActive(false);
|
|
stepsixpanl3.gameObject.SetActive(true);
|
|
});
|
|
yesbutton.onClick.AddListener(() =>
|
|
{
|
|
yesisp = true;
|
|
stepsixpanl3.gameObject.SetActive(false);
|
|
stepsixpanl4.gameObject.SetActive(true);
|
|
});
|
|
nobutton.onClick.AddListener(() =>
|
|
{
|
|
stepsixpanl3.gameObject.SetActive(false);
|
|
stepsixpanl4.gameObject.SetActive(true);
|
|
});
|
|
sendbutton6.onClick.AddListener(() =>
|
|
{
|
|
Debug.Log("第六步得分");
|
|
if (serialtoggle6.isOn)
|
|
{
|
|
ScoreManager.Instance.AddScore(1.5f);//是否勾选
|
|
stepsix1 = ScoreManager.Instance.scores[5] * 0.2f;
|
|
}
|
|
if (yesisp)
|
|
{
|
|
ScoreManager.Instance.AddScore(2f);//签收
|
|
stepsix2 = ScoreManager.Instance.scores[5] * 0.2f;
|
|
}
|
|
if (passtoggle6.isOn)
|
|
{
|
|
ScoreManager.Instance.AddScore(9);//是否通过
|
|
stepsix3 = ScoreManager.Instance.scores[5] * 0.6f;
|
|
}
|
|
float value = stepsix1 + stepsix2 + stepsix3;
|
|
ScoreManager.Instance.totalpoints.Add(value);
|
|
Debug.Log(ScoreManager.Instance.Score);
|
|
stepsixpanl4.gameObject.SetActive(false);
|
|
});
|
|
passtoggle6.onValueChanged.AddListener((ison) =>
|
|
{
|
|
|
|
});
|
|
}
|
|
/// <summary>
|
|
/// 图片高亮
|
|
/// </summary>
|
|
/// <param name="toggle"></param>
|
|
private void Gettoggle(Toggle toggle)
|
|
{
|
|
if (toggle.isOn)
|
|
{
|
|
|
|
serialimage6.gameObject.SetActive(true);
|
|
}
|
|
else
|
|
{
|
|
|
|
serialimage6.gameObject.SetActive(false);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 初始化页面
|
|
/// </summary>
|
|
public void Getpage()
|
|
{
|
|
stepsixpanl.gameObject.SetActive(true);
|
|
}
|
|
/// <summary>
|
|
/// 初始化得分步骤按钮
|
|
/// </summary>
|
|
public void Getrestore6()
|
|
{
|
|
inputfid6.text = null;
|
|
serialtoggle6.isOn = false;
|
|
serialimage6.gameObject.SetActive(false);
|
|
passtoggle6.isOn = false;
|
|
nopasstoggle6.isOn = false;
|
|
}
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|