2024-12-11 14:37:42 +08:00
|
|
|
|
using DG.Tweening;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
2024-12-12 09:18:00 +08:00
|
|
|
|
using Unity.VisualScripting;
|
2024-12-11 14:37:42 +08:00
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
|
|
public class ZZUIManager : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
[Header("<22><><EFBFBD><EFBFBD>")]
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ե<EFBFBD><D4B5><EFBFBD><EFBFBD>ұ߿<D2B1>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public GameObject Right_Box;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><>ָ<EFBFBD>ӿ<EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public GameObject Warn_Tip;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// ѧ<><D1A7><EFBFBD><EFBFBD>ɢ<EFBFBD><C9A2><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public GameObject Right_Situation;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD>뷽<EFBFBD><EBB7BD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public GameObject DiaLogBox;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><>¥<EFBFBD>ݶ<EFBFBD><DDB6><EFBFBD>ѡ<EFBFBD><D1A1>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public GameObject DiaLogBox2;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20>Ѿ<EFBFBD><D1BE><EFBFBD>ȫ<EFBFBD><C8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public GameObject Right_Message;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Ϊ<>ܰ<EFBFBD>ȫ<EFBFBD><C8AB><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public GameObject Right_Message2;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Dropdown dropdwn;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD>뷽<EFBFBD><EBB7BD>ѡ<EFBFBD><D1A1>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ToggleGroup Tip123;
|
2024-12-12 09:18:00 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><>ͼ<EFBFBD>ϵ<EFBFBD><CFB5>ĸ<EFBFBD><C4B8><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public GameObject MapTapPanel;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><>ɢ<EFBFBD><C9A2>ʾ
|
|
|
|
|
/// </summary>
|
|
|
|
|
public GameObject Command02;
|
|
|
|
|
//<2F>ұ߿<D2B1><DFBF><EFBFBD><F2B4B4BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>ĸ<EFBFBD><C4B8><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
public GameObject content;
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>Ķ<EFBFBD><C4B6><EFBFBD>
|
|
|
|
|
public GameObject TextPrefab;
|
|
|
|
|
|
|
|
|
|
//<2F><>ɢ<EFBFBD><C9A2><EFBFBD><EFBFBD>
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
public GameObject content2;
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>Ķ<EFBFBD><C4B6><EFBFBD>
|
|
|
|
|
public GameObject TextPrefab2;
|
|
|
|
|
|
2024-12-11 14:37:42 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD>¥<EFBFBD><C2A5>
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Header("<22><>ť")]
|
|
|
|
|
public Button Icn_Stairway_1;
|
|
|
|
|
public Button Icn_Stairway_2;
|
|
|
|
|
public Button Icn_Stairway_3;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><>ɢ˳<C9A2><CBB3>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Button Warn;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Button Flee;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD>һ<EFBFBD>ŵ<EFBFBD><C5B5><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Button Die;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD>Ķ<EFBFBD><C4B6>ŵ<EFBFBD><C5B5><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Button Phone;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><>ͼF4
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Button TP_1;
|
|
|
|
|
public Button TP_2;
|
|
|
|
|
public Button TP_3;
|
|
|
|
|
public Button TP_4;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20>Խ<EFBFBD><D4BD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Button Intercom;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD>Ʒ<EFBFBD><C6B7>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Button Prop1;
|
|
|
|
|
public Button Prop2;
|
|
|
|
|
public Button Prop3;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20>ұ<EFBFBD><D2B1><EFBFBD>Ʒ<EFBFBD><C6B7>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Button Prop4;
|
|
|
|
|
public Button Prop5;
|
|
|
|
|
public Button Prop6;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҷ<EFBFBD><D2B7><EFBFBD>ABC
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Toggle DialogboxA;
|
|
|
|
|
public Toggle DialogboxB;
|
|
|
|
|
public Toggle DialogboxC;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD>뷽<EFBFBD><EBB7BD>ȷ<EFBFBD><C8B7>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Button DialogboxSure;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20>ݶӶ<DDB6><D3B6><EFBFBD>ѡ<EFBFBD><D1A1>AB
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Button Dialogbox2A;
|
|
|
|
|
public Button Dialogbox2B;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20>ݶ<EFBFBD>ѡ<EFBFBD><D1A1>ȷ<EFBFBD><C8B7>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Button Dialogbox2Sure;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20>Ӽ<EFBFBD><D3BC><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Button Minus;
|
|
|
|
|
public Button Plus;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20>ϱ<EFBFBD><CFB1><EFBFBD>ť
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Button Sumbit;
|
|
|
|
|
public Button Sumbit2;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// ȷ<><C8B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㰴ť
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Button FireButton;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20>ұߵĿ<DFB5>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Button Right_BoxButton;
|
2024-12-12 09:18:00 +08:00
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2024-12-11 14:37:42 +08:00
|
|
|
|
public Button Close1;
|
|
|
|
|
public Button Close2;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Header("<22>ı<EFBFBD>")]
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20>ұ߿<D2B1><DFBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Text Tip_1;
|
|
|
|
|
public Text Tip_2;
|
|
|
|
|
public Text Tip_3;
|
|
|
|
|
public Text Tip_4;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20>ֳ<EFBFBD><D6B3><EFBFBD>ָ<EFBFBD><D6B8>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Text Head_Text;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><>ָ<EFBFBD>ӽ<EFBFBD><D3BD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Text WarnTip_Text;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><>ɢ<EFBFBD><C9A2><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Text Situation_Tip_1;
|
|
|
|
|
public Text Situation_Tip_2;
|
|
|
|
|
public Text Situation_Tip_3;
|
|
|
|
|
public Text Situation_Tip_4;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD>뷽<EFBFBD><EBB7BD>ABC
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Text LeftText1;
|
|
|
|
|
public Text LeftText2;
|
|
|
|
|
public Text LeftText3;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD>뷽<EFBFBD><EBB7BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Text RightText1;
|
|
|
|
|
public Text RightText2;
|
|
|
|
|
public Text RightText3;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// ¥<><C2A5><EFBFBD>ݶӽ<DDB6><D3BD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Text LeftLT_Text1;
|
|
|
|
|
public Text RightLT_Text1;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20>ݶӽ<DDB6><D3BD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Text LeftLT_Text2;
|
|
|
|
|
public Text RightLT_Text;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD>༶
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Text Right_MessageText;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// ѧ<><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public InputField Student_Number;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// δ<><CEB4><EFBFBD><EFBFBD><EFBFBD>༶
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Text NO_Left_MessageText;
|
|
|
|
|
public Text NO_Right_MessageText;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// δ<><CEB4><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Text NO_Student;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// ʱ<><CAB1><EFBFBD>ı<EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Text TimeText;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-><3E><>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Text PropText1;
|
|
|
|
|
public Text PropText2;
|
|
|
|
|
public Text PropText3;
|
|
|
|
|
public Text PropText4;
|
|
|
|
|
public Text PropText5;
|
|
|
|
|
public Text PropText6;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD>ӳ<EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Text WLYC;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Text TileText;
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>㰴ť<E3B0B4>ı<EFBFBD>
|
|
|
|
|
public Text FireText;
|
|
|
|
|
|
|
|
|
|
//<2F><>ʱ<EFBFBD><CAB1>
|
|
|
|
|
private float timeElapsed = 0f;
|
|
|
|
|
//<2F><>¼
|
|
|
|
|
int num = 0;
|
|
|
|
|
public Image bg;
|
|
|
|
|
|
|
|
|
|
public float moveDuration = 0.5f; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
|
|
|
|
public RectTransform buttonRect; // <20><><EFBFBD>İ<EFBFBD>ť RectTransform
|
|
|
|
|
public bool isHidden=true;
|
|
|
|
|
public float showPositionX;
|
|
|
|
|
public float hidePositionX;
|
|
|
|
|
|
|
|
|
|
public ZZUIManager instert;
|
|
|
|
|
public void Awake()
|
|
|
|
|
{
|
|
|
|
|
isHidden = true;
|
|
|
|
|
instert = this;
|
|
|
|
|
TimeText.text = "00.00";
|
|
|
|
|
num = 0;
|
|
|
|
|
}
|
|
|
|
|
private void Start()
|
|
|
|
|
{
|
2024-12-12 09:18:00 +08:00
|
|
|
|
|
2024-12-11 14:37:42 +08:00
|
|
|
|
hidePositionX = 337f;
|
|
|
|
|
showPositionX = 1.159973f;
|
|
|
|
|
//<2F>ұ߿<D2B1><DFBF><EFBFBD><F2B5AFB3><EFBFBD>
|
|
|
|
|
Right_BoxButton.onClick.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
OnClickHideButton();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
#region <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
Prop1.onClick.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
Prop(1);
|
|
|
|
|
});
|
|
|
|
|
Prop2.onClick.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
Prop(2);
|
|
|
|
|
});
|
|
|
|
|
Prop3.onClick.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
Prop(3);
|
|
|
|
|
});
|
|
|
|
|
Prop4.onClick.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
Prop(4);
|
|
|
|
|
});
|
|
|
|
|
Prop5.onClick.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
Prop(5);
|
|
|
|
|
});
|
|
|
|
|
Prop6.onClick.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
Prop(6);
|
|
|
|
|
});
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region <EFBFBD>ر<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>(<EFBFBD><EFBFBD>ͼ<EFBFBD><EFBFBD><EFBFBD>ĸ<EFBFBD><EFBFBD><EFBFBD>)
|
|
|
|
|
TP_1.onClick.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
MapTP(1);
|
|
|
|
|
});
|
|
|
|
|
TP_2.onClick.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
MapTP(2);
|
|
|
|
|
});
|
|
|
|
|
TP_3.onClick.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
MapTP(3);
|
|
|
|
|
});
|
|
|
|
|
TP_4.onClick.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
MapTP(4);
|
|
|
|
|
});
|
|
|
|
|
#endregion
|
|
|
|
|
//<2F>ر<EFBFBD><D8B1><EFBFBD>ָ<EFBFBD>ӿ<EFBFBD>
|
|
|
|
|
if (Warn_Tip.activeSelf&&(Input.GetMouseButtonDown(0)|| Input.GetMouseButtonDown(1)|| Input.GetMouseButtonDown(2)))
|
|
|
|
|
{
|
|
|
|
|
Warn_Tip.SetActive(false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Minus.onClick.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
int currentValue = int.Parse(Student_Number.text);
|
|
|
|
|
// <20><><EFBFBD><EFBFBD>1
|
|
|
|
|
currentValue--;
|
|
|
|
|
// <20><><EFBFBD><EFBFBD> InputField <20><><EFBFBD>ı<EFBFBD>
|
|
|
|
|
Student_Number.text = currentValue.ToString();
|
|
|
|
|
});
|
|
|
|
|
Plus.onClick.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
int currentValue = int.Parse(Student_Number.text);
|
|
|
|
|
// <20><><EFBFBD><EFBFBD>1
|
|
|
|
|
currentValue++;
|
|
|
|
|
// <20><><EFBFBD><EFBFBD> InputField <20><><EFBFBD>ı<EFBFBD>
|
|
|
|
|
Student_Number.text = currentValue.ToString();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//<2F><EFBFBD><F2BFAAB6><EFBFBD>
|
|
|
|
|
Flee.onClick.AddListener(() => {
|
|
|
|
|
DiaLogBox2.SetActive(true);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Close1.onClick.AddListener(() => { Close(); });
|
|
|
|
|
Close2.onClick.AddListener(() => { Close(); });
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>(<28><><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1>)
|
|
|
|
|
dropdwn.onValueChanged.AddListener(delegate {
|
|
|
|
|
DropdownValueChanged(dropdwn);
|
|
|
|
|
});
|
|
|
|
|
//Ĭ<>Ͽ<EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><D6BE><EFBFBD>Ĭ<EFBFBD>ϵ<EFBFBD>һ<EFBFBD><D2BB>ѡ<EFBFBD><D1A1>һ<EFBFBD><D2BB>
|
|
|
|
|
DropdownValueChanged(dropdwn);
|
|
|
|
|
|
|
|
|
|
//<2F>ұ߿<D2B1><DFBF><EFBFBD> <20>ϱ<EFBFBD><CFB1><EFBFBD>ָ (<28>Ѿ<EFBFBD><D1BE><EFBFBD>ȫ<EFBFBD><C8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
|
|
|
|
Sumbit.onClick.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
SumbitButton();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//<2F>ұ߿<D2B1><DFBF><EFBFBD> <20>ϱ<EFBFBD><CFB1><EFBFBD>ָ (δ<><CEB4>ȫ<EFBFBD><C8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
|
|
|
|
Sumbit2.onClick.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
Sumbit2Button();
|
|
|
|
|
});
|
|
|
|
|
//<2F><><EFBFBD>뷽<EFBFBD><EBB7BD>ѡ<EFBFBD><D1A1>
|
|
|
|
|
DialogboxA.onValueChanged.AddListener(delegate { OnToggleChanged(DialogboxA); });
|
|
|
|
|
DialogboxB.onValueChanged.AddListener(delegate { OnToggleChanged(DialogboxB); });
|
|
|
|
|
DialogboxC.onValueChanged.AddListener(delegate { OnToggleChanged(DialogboxC); });
|
|
|
|
|
//<2F><><EFBFBD>뷽<EFBFBD><EBB7BD>ȷ<EFBFBD><C8B7>
|
|
|
|
|
DialogboxSure.onClick.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
DiaLogBox.SetActive(false);
|
|
|
|
|
});
|
|
|
|
|
//<2F>ݶ<EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
Dialogbox2A.onClick.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
num = 1;
|
|
|
|
|
});
|
|
|
|
|
Dialogbox2B.onClick.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
num = 2;
|
|
|
|
|
});
|
|
|
|
|
//<2F>ݶӶ<DDB6><D3B6><EFBFBD>ȷ<EFBFBD><C8B7>
|
|
|
|
|
Dialogbox2Sure.onClick.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
if(num==1)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
num = 0;
|
|
|
|
|
DiaLogBox2.SetActive(false);
|
|
|
|
|
}
|
|
|
|
|
if(num==2)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
num = 0;
|
|
|
|
|
DiaLogBox2.SetActive(false);
|
|
|
|
|
}
|
|
|
|
|
});
|
2024-12-12 09:18:00 +08:00
|
|
|
|
FireButton.onClick.AddListener(() => {
|
|
|
|
|
|
|
|
|
|
FireText.color = new Color(0.75f, 0.75f, 0.75f);
|
|
|
|
|
});
|
2024-12-11 14:37:42 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
private void Update()
|
|
|
|
|
{
|
|
|
|
|
// <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
|
|
|
|
timeElapsed += Time.deltaTime;
|
|
|
|
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӻ<EFBFBD><D3BA><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
int minutes = Mathf.FloorToInt(timeElapsed / 60);
|
|
|
|
|
int seconds = Mathf.FloorToInt(timeElapsed % 60);
|
|
|
|
|
|
|
|
|
|
// <20><>ʽ<EFBFBD><CABD>ʱ<EFBFBD><CAB1>Ϊ "00.00" <20><>ʽ
|
|
|
|
|
TimeText.text = string.Format("{0:00}.{1:00}", minutes, seconds);
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
public void OnClickHideButton()
|
|
|
|
|
{
|
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ť<EFBFBD><C5A5><EFBFBD><EFBFBD><EFBFBD>أ<EFBFBD><D8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
|
|
|
|
if (isHidden)
|
|
|
|
|
{
|
|
|
|
|
// <20>ָ<EFBFBD><D6B8><EFBFBD>ť<EFBFBD><C5A5>ԭλ<D4AD><CEBB>
|
|
|
|
|
buttonRect.DOAnchorPosX(showPositionX, moveDuration).SetEase(Ease.InOutCubic);
|
|
|
|
|
bg.transform.Rotate(0, 0,180f);
|
|
|
|
|
isHidden = false; // <20><><EFBFBD><EFBFBD>״̬Ϊδ<CEAA><CEB4><EFBFBD><EFBFBD>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
// <20><><EFBFBD>ذ<EFBFBD>ť
|
|
|
|
|
buttonRect.DOAnchorPosX(hidePositionX, moveDuration).SetEase(Ease.InOutCubic);
|
|
|
|
|
bg.transform.Rotate(0, 0,180f);
|
|
|
|
|
isHidden = true; // <20><><EFBFBD><EFBFBD>״̬Ϊ<CCAC><CEAA><EFBFBD><EFBFBD>
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫִ<D2AA>е<EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="a"><3E><><EFBFBD><EFBFBD>-><3E><></param>
|
|
|
|
|
public void Prop(int a)
|
|
|
|
|
{
|
|
|
|
|
switch (a)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
break;
|
|
|
|
|
case 4:
|
|
|
|
|
break;
|
|
|
|
|
case 5:
|
|
|
|
|
break;
|
|
|
|
|
case 6:
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><>ͼ<EFBFBD>ص<EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="a">1-<2D>ٳ<EFBFBD> 2-<2D><><EFBFBD><EFBFBD> 3-<2D><><EFBFBD><EFBFBD> 4-¥<><C2A5></param>
|
|
|
|
|
public void MapTP(int a)
|
|
|
|
|
{
|
|
|
|
|
switch(a)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
|
2024-12-12 09:18:00 +08:00
|
|
|
|
FireText.color = new Color(1f, 1f, 1f);
|
2024-12-11 14:37:42 +08:00
|
|
|
|
TileText.text = "<22><>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɢ<EFBFBD><C9A2>¥<EFBFBD><C2A5>";
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
|
2024-12-12 09:18:00 +08:00
|
|
|
|
FireText.color = new Color(1f, 1f, 1f);
|
2024-12-11 14:37:42 +08:00
|
|
|
|
TileText.text = "<22><>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɢ<EFBFBD><C9A2>¥<EFBFBD><C2A5>";
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
|
2024-12-12 09:18:00 +08:00
|
|
|
|
FireText.color = new Color(1f, 1f, 1f);
|
2024-12-11 14:37:42 +08:00
|
|
|
|
TileText.text = "<22><>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɢ<EFBFBD><C9A2>¥<EFBFBD><C2A5>";
|
|
|
|
|
break;
|
|
|
|
|
case 4:
|
|
|
|
|
|
2024-12-12 09:18:00 +08:00
|
|
|
|
FireText.color = new Color(1f, 1f, 1f);
|
2024-12-11 14:37:42 +08:00
|
|
|
|
TileText.text = "<22><>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɢ<EFBFBD><C9A2>¥<EFBFBD><C2A5>";
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>ִ<EFBFBD>е<EFBFBD><D0B5>¼<EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="change"></param>
|
|
|
|
|
void DropdownValueChanged(Dropdown change)
|
|
|
|
|
{
|
|
|
|
|
int index = change.value;
|
|
|
|
|
switch (index)
|
|
|
|
|
{
|
|
|
|
|
case 0:
|
|
|
|
|
// ִ<><D6B4> Option 1 <20><><EFBFBD>ص<EFBFBD><D8B5>¼<EFBFBD>
|
|
|
|
|
Debug.Log("Option 1 selected");
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
|
|
|
|
// ִ<><D6B4> Option 2 <20><><EFBFBD>ص<EFBFBD><D8B5>¼<EFBFBD>
|
|
|
|
|
Debug.Log("Option 2 selected");
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
// ִ<><D6B4> Option 3 <20><><EFBFBD>ص<EFBFBD><D8B5>¼<EFBFBD>
|
|
|
|
|
Debug.Log("Option 3 selected");
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
break;
|
|
|
|
|
case 4:
|
|
|
|
|
break;
|
|
|
|
|
case 5:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><EFBFBD><DEB8>ұ߿<D2B1><DFBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="str"><3E><><EFBFBD><EFBFBD></param>
|
|
|
|
|
/// <param name="a"><3E><><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD></param>
|
|
|
|
|
public void FixWarn(string str,int a)
|
|
|
|
|
{
|
|
|
|
|
switch (a)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
break;
|
|
|
|
|
case 4:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӳ<EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="str"><3E><><EFBFBD><EFBFBD><EFBFBD>ӳٵ<D3B3><D9B5><EFBFBD><EFBFBD>ֲ<EFBFBD><D6B2><EFBFBD></param>
|
|
|
|
|
public void FixDelay(string str)
|
|
|
|
|
{
|
|
|
|
|
WLYC.text = "<22><><EFBFBD><EFBFBD><EFBFBD>ӳ٣<D3B3>" + str;
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><EFBFBD><DEB8><EFBFBD>ɢ<EFBFBD>༶<EFBFBD><E0BCB6><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="str"><3E>༶<EFBFBD><E0BCB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></param>
|
|
|
|
|
/// <param name="a"><3E><><EFBFBD>µڼ<C2B5><DABC><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></param>
|
|
|
|
|
public void FixSituation(string str,int a)
|
|
|
|
|
{
|
|
|
|
|
switch (a)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
Situation_Tip_1.text = str;
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
Situation_Tip_2.text = str;
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
Situation_Tip_3.text = str;
|
|
|
|
|
break;
|
|
|
|
|
case 4:
|
|
|
|
|
Situation_Tip_4.text = str;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20>ijɹ<C4B3><C9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>༶<EFBFBD><E0BCB6><EFBFBD><EFBFBD>Ϣ
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="str"><3E><><EFBFBD><EFBFBD><EFBFBD>༶<EFBFBD><E0BCB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD></param>
|
|
|
|
|
/// <param name="a"><3E><><EFBFBD><EFBFBD></param>
|
|
|
|
|
public void FixFledOk(string str,int a)
|
|
|
|
|
{
|
|
|
|
|
Right_MessageText.text = str;
|
|
|
|
|
int currentValue = int.Parse(Student_Number.text);
|
|
|
|
|
currentValue = a;
|
|
|
|
|
// <20><><EFBFBD><EFBFBD> InputField <20><><EFBFBD>ı<EFBFBD>
|
|
|
|
|
Student_Number.text = currentValue.ToString();
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><EFBFBD>δ<EFBFBD><CEB4><EFBFBD><EFBFBD><EFBFBD>༶
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="str">δ<><CEB4><EFBFBD><EFBFBD><EFBFBD>İ༶</param>
|
|
|
|
|
/// <param name="a">δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></param>
|
|
|
|
|
public void FixNo(string str,int a)
|
|
|
|
|
{
|
|
|
|
|
NO_Left_MessageText.text = str;
|
|
|
|
|
NO_Right_MessageText.text = str;
|
|
|
|
|
NO_Student.text =a.ToString();
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20>ij<DEB8><C4B3>뷽<EFBFBD><EBB7BD><EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="str"><3E><><EFBFBD><EFBFBD></param>
|
|
|
|
|
/// <param name="a">A=1,B=2,C=3ѡ<33><D1A1></param>
|
|
|
|
|
public void FixFled(string str,int a)
|
|
|
|
|
{
|
|
|
|
|
switch (a)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
RightText1.text = str;
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
RightText2.text = str;
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
RightText3.text = str;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD>뷽<EFBFBD><EBB7BD>ѡ<EFBFBD><D1A1>
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="change">A-1 B-2 C-3</param>
|
|
|
|
|
public void OnToggleChanged(Toggle changedToggle)
|
|
|
|
|
{
|
|
|
|
|
if (changedToggle.isOn)
|
|
|
|
|
{
|
|
|
|
|
if (changedToggle == DialogboxA)
|
|
|
|
|
{
|
|
|
|
|
Debug.Log("Toggle 1 is selected");
|
|
|
|
|
}
|
|
|
|
|
else if (changedToggle == DialogboxB)
|
|
|
|
|
{
|
|
|
|
|
Debug.Log("Toggle 2 is selected");
|
|
|
|
|
}
|
|
|
|
|
else if (changedToggle == DialogboxC)
|
|
|
|
|
{
|
|
|
|
|
Debug.Log("Toggle 3 is selected");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20>Ѿ<EFBFBD><D1BE><EFBFBD>ȫ<EFBFBD><C8AB><EFBFBD><EFBFBD><EFBFBD>İ༶ <20>ϱ<EFBFBD><CFB1><EFBFBD>ָ <20><>ť<EFBFBD>¼<EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public void SumbitButton()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// δ<><CEB4>ȫ<EFBFBD><C8AB><EFBFBD><EFBFBD><EFBFBD>İ༶ <20>ϱ<EFBFBD><CFB1><EFBFBD>ָ <20><>ť<EFBFBD>¼<EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public void Sumbit2Button()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
2024-12-12 09:18:00 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20>رյ<D8B1><D5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public void FirePanel()
|
|
|
|
|
{
|
|
|
|
|
FireText.color = new Color(0.75f, 0.75f, 0.75f);
|
|
|
|
|
if (MapTapPanel.activeSelf)
|
|
|
|
|
{
|
|
|
|
|
MapTapPanel.SetActive(false);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
MapTapPanel.SetActive(true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><>ɢ<EFBFBD><C9A2>ʾ
|
|
|
|
|
/// </summary>
|
|
|
|
|
public void WarnPanel()
|
|
|
|
|
{
|
|
|
|
|
if(Command02.activeSelf)
|
|
|
|
|
{
|
|
|
|
|
Command02.SetActive(false);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Command02.SetActive(true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD>뷽<EFBFBD><EBB7BD>ѡ<EFBFBD><D1A1>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public void DialogboxPanel()
|
|
|
|
|
{
|
|
|
|
|
if(DiaLogBox.activeSelf)
|
|
|
|
|
{
|
|
|
|
|
DiaLogBox.SetActive(false);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
DiaLogBox.SetActive(true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><>¥<EFBFBD>ݶ<EFBFBD><DDB6><EFBFBD>ѡ<EFBFBD><D1A1>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public void DialogBoxPanel2Panel()
|
|
|
|
|
{
|
|
|
|
|
if (DiaLogBox2.activeSelf)
|
|
|
|
|
{
|
|
|
|
|
DiaLogBox2.SetActive(false);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
DiaLogBox2.SetActive(true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="str"><3E>ı<EFBFBD><C4B1><EFBFBD><EFBFBD><EFBFBD></param>
|
|
|
|
|
public void CreateWarn(string str)
|
|
|
|
|
{
|
|
|
|
|
GameObject newText = Instantiate(TextPrefab);
|
|
|
|
|
newText.transform.SetParent(content.transform, false);
|
|
|
|
|
Text text=newText.GetComponentInChildren<Text>();
|
|
|
|
|
text.text = str;
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɢ<EFBFBD><C9A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="str"><3E>ı<EFBFBD><C4B1><EFBFBD><EFBFBD><EFBFBD></param>
|
|
|
|
|
public void CreateSituation(string str)
|
|
|
|
|
{
|
|
|
|
|
GameObject newText = Instantiate(TextPrefab2);
|
|
|
|
|
newText.transform.SetParent(content2.transform, false);
|
|
|
|
|
Text text = newText.GetComponentInChildren<Text>();
|
|
|
|
|
text.text = str;
|
|
|
|
|
}
|
2024-12-11 14:37:42 +08:00
|
|
|
|
private void Close()
|
|
|
|
|
{
|
|
|
|
|
DiaLogBox2?.SetActive(false);
|
|
|
|
|
DiaLogBox?.SetActive(false);
|
|
|
|
|
}
|
|
|
|
|
}
|