2024-12-11 14:37:42 +08:00
|
|
|
|
using DG.Tweening;
|
2024-12-12 16:36:07 +08:00
|
|
|
|
using JetBrains.Annotations;
|
2024-12-11 14:37:42 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
2024-12-15 17:11:33 +08:00
|
|
|
|
using System.Reflection;
|
2024-12-12 16:36:07 +08:00
|
|
|
|
using System.Text.RegularExpressions;
|
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-12 16:36:07 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><>ʾ<EFBFBD><CABE>ɢʱ<C9A2><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public GameObject TipPanel;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD><C4B1><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public GameObject TipTilte;
|
2024-12-12 09:18:00 +08:00
|
|
|
|
|
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><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;
|
2024-12-12 17:51:05 +08:00
|
|
|
|
public GameObject Close1Panel;
|
|
|
|
|
public GameObject FreePanel;
|
2024-12-11 14:37:42 +08:00
|
|
|
|
|
2024-12-12 16:36:07 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// ¥<>ݿ<EFBFBD>
|
|
|
|
|
/// </summary>
|
2024-12-11 14:37:42 +08:00
|
|
|
|
[Header("<22>ı<EFBFBD>")]
|
2024-12-12 16:36:07 +08:00
|
|
|
|
public Text icn_stairway_text_1;
|
|
|
|
|
public Text icn_stairway_text_2;
|
|
|
|
|
public Text icn_stairway_text_3;
|
2024-12-11 14:37:42 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20>ұ߿<D2B1><DFBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Text Tip_1;
|
2024-12-12 16:36:07 +08:00
|
|
|
|
public Text Tip_2;
|
2024-12-11 14:37:42 +08:00
|
|
|
|
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;
|
2024-12-12 16:36:07 +08:00
|
|
|
|
|
|
|
|
|
|
2024-12-11 14:37:42 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD>뷽<EFBFBD><EBB7BD>ABC
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Text LeftText1;
|
2024-12-15 17:11:33 +08:00
|
|
|
|
|
2024-12-11 14:37:42 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD>뷽<EFBFBD><EBB7BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Text RightText1;
|
|
|
|
|
/// <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;
|
2024-12-12 16:36:07 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD>㰴ť<E3B0B4>ı<EFBFBD>
|
|
|
|
|
/// </summary>
|
2024-12-11 14:37:42 +08:00
|
|
|
|
public Text FireText;
|
2024-12-12 16:36:07 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><>ʾ<EFBFBD><CABE>ɢʱ<C9A2><CAB1><EFBFBD>ı<EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Text TipText;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Σ<><CEA3><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>ť<EFBFBD>ı<EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Text WartipText;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֪<EFBFBD><D6AA><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD>ı<EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Text MessageText;
|
|
|
|
|
public Text MessageText2;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Text Area;
|
|
|
|
|
public Text NPCName;
|
2024-12-11 14:37:42 +08:00
|
|
|
|
|
2024-12-16 17:17:46 +08:00
|
|
|
|
public Sprite Image1;
|
|
|
|
|
public Sprite Image2;
|
|
|
|
|
|
2024-12-12 16:36:07 +08:00
|
|
|
|
#region <EFBFBD><EFBFBD><EFBFBD>뵭<EFBFBD><EFBFBD>Ч<EFBFBD><EFBFBD>
|
2024-12-11 14:37:42 +08:00
|
|
|
|
//<2F><>ʱ<EFBFBD><CAB1>
|
|
|
|
|
private float timeElapsed = 0f;
|
2024-12-12 16:36:07 +08:00
|
|
|
|
public float fadeInDuration = 1f; // <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
|
|
|
|
public float fadeOutDuration = 1f; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
|
|
|
|
public float displayDuration = 2f; // 2<><32><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
private bool isFadingIn = true;
|
|
|
|
|
private bool isFadingOut = false;
|
|
|
|
|
// ָʾ<D6B8>ı<EFBFBD><C4B1><EFBFBD>ǰ<EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
private bool isFading = false;
|
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD>еĵ<D0B5><C4B5>뵭<EFBFBD><EBB5AD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
private Coroutine fadeCoroutine;
|
|
|
|
|
//<2F><><EFBFBD>뵭<EFBFBD><EBB5AD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
|
|
|
|
private float elapsedTime = 0f;
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region ͼ<EFBFBD>궯Ч
|
|
|
|
|
////<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
//private float ContinueTime = 100000000000f;
|
|
|
|
|
////<2F><>¼
|
|
|
|
|
//private float tempTime = 0f;
|
|
|
|
|
//<2F><>̾<EFBFBD><CCBE>
|
|
|
|
|
[Header("ͼƬ")]
|
|
|
|
|
//<2F><>ʾ<EFBFBD><CABE>ɢʱ<C9A2><CAB1><EFBFBD>ı<EFBFBD><C4B1><EFBFBD>ͼ
|
|
|
|
|
public Image TipBg;
|
|
|
|
|
public Image HeadImage;
|
|
|
|
|
public Image Bg;
|
|
|
|
|
//<2F>ұ<EFBFBD>
|
|
|
|
|
public Image Bg1;
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־
|
|
|
|
|
private bool isEnd;
|
2024-12-15 17:11:33 +08:00
|
|
|
|
|
|
|
|
|
public JSONReader jsonReader;
|
2024-12-12 16:36:07 +08:00
|
|
|
|
#endregion
|
|
|
|
|
|
2024-12-15 17:11:33 +08:00
|
|
|
|
#region ʵ<EFBFBD>ֳ<EFBFBD><EFBFBD>뷽<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
public GameObject content3; // Scroll View <20><> Content <20><><EFBFBD><EFBFBD>
|
|
|
|
|
public GridLayoutGroup gridLayoutGroup2; // Grid Layout Group <20><><EFBFBD><EFBFBD>
|
|
|
|
|
public GameObject itemPrefab; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԥ<EFBFBD>Ƽ<EFBFBD>
|
|
|
|
|
public ToggleGroup toggleGroup;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
public Text itemPrefabTextLeft;//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
public Text itemPrefabTextRight;//<2F><><EFBFBD><EFBFBD>
|
2024-12-16 17:17:46 +08:00
|
|
|
|
public int itemCount = 3; // Ҫ<><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2024-12-15 17:11:33 +08:00
|
|
|
|
|
|
|
|
|
#endregion
|
2024-12-11 14:37:42 +08:00
|
|
|
|
|
2024-12-12 16:36:07 +08:00
|
|
|
|
#region <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƿ<EFBFBD><EFBFBD><EFBFBD>ɢ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
public RectTransform panelA;
|
|
|
|
|
public float panelAMoveDistance;
|
2024-12-11 14:37:42 +08:00
|
|
|
|
public float moveDuration = 0.5f; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
|
|
|
|
public RectTransform buttonRect; // <20><><EFBFBD>İ<EFBFBD>ť RectTransform
|
2024-12-12 16:36:07 +08:00
|
|
|
|
public bool isHidden = true;
|
2024-12-11 14:37:42 +08:00
|
|
|
|
public float showPositionX;
|
|
|
|
|
public float hidePositionX;
|
2024-12-12 16:36:07 +08:00
|
|
|
|
#endregion
|
|
|
|
|
//<2F><>¼
|
|
|
|
|
int num = 0;
|
|
|
|
|
public Image bg;
|
|
|
|
|
|
|
|
|
|
#region <EFBFBD><EFBFBD>ɢ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>༶<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
public GridLayoutGroup gridLayoutGroup;
|
|
|
|
|
private List<Text> textFields = new List<Text>();
|
|
|
|
|
#endregion
|
|
|
|
|
|
2024-12-11 14:37:42 +08:00
|
|
|
|
|
|
|
|
|
public ZZUIManager instert;
|
|
|
|
|
public void Awake()
|
|
|
|
|
{
|
|
|
|
|
isHidden = true;
|
|
|
|
|
instert = this;
|
|
|
|
|
TimeText.text = "00.00";
|
|
|
|
|
num = 0;
|
|
|
|
|
}
|
|
|
|
|
private void Start()
|
|
|
|
|
{
|
2024-12-15 17:11:33 +08:00
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
// Frist();
|
|
|
|
|
//FixWarn(1,jsonReader.SetUIText(50102));
|
|
|
|
|
//string str = jsonReader.SetUIText(50102);
|
|
|
|
|
//Debug.Log(jsonReader.SetUIText(50102));
|
|
|
|
|
//Debug.Log(str);
|
2024-12-16 17:17:46 +08:00
|
|
|
|
|
|
|
|
|
|
2024-12-15 17:11:33 +08:00
|
|
|
|
InitializeFlee();
|
|
|
|
|
|
2024-12-12 16:36:07 +08:00
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2024-12-11 14:37:42 +08:00
|
|
|
|
hidePositionX = 337f;
|
|
|
|
|
showPositionX = 1.159973f;
|
2024-12-12 16:36:07 +08:00
|
|
|
|
panelAMoveDistance = 382f;
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
Intercom.onClick.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
});
|
2024-12-11 14:37:42 +08:00
|
|
|
|
//<2F>ұ߿<D2B1><DFBF><EFBFBD><F2B5AFB3><EFBFBD>
|
|
|
|
|
Right_BoxButton.onClick.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
OnClickHideButton();
|
|
|
|
|
});
|
2024-12-12 16:36:07 +08:00
|
|
|
|
|
2024-12-11 14:37:42 +08:00
|
|
|
|
#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>
|
2024-12-12 16:36:07 +08:00
|
|
|
|
if (Warn_Tip.activeSelf && (Input.GetMouseButtonDown(0) || Input.GetMouseButtonDown(1) || Input.GetMouseButtonDown(2)))
|
2024-12-11 14:37:42 +08:00
|
|
|
|
{
|
|
|
|
|
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>
|
2024-12-12 16:36:07 +08:00
|
|
|
|
Flee.onClick.AddListener(() =>
|
|
|
|
|
{
|
2024-12-11 14:37:42 +08:00
|
|
|
|
DiaLogBox2.SetActive(true);
|
2024-12-12 17:51:05 +08:00
|
|
|
|
Close1Panel.SetActive(true);
|
2024-12-11 14:37:42 +08:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Close1.onClick.AddListener(() => { Close(); });
|
|
|
|
|
Close2.onClick.AddListener(() => { Close(); });
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>(<28><><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1>)
|
2024-12-12 16:36:07 +08:00
|
|
|
|
dropdwn.onValueChanged.AddListener(delegate
|
|
|
|
|
{
|
2024-12-11 14:37:42 +08:00
|
|
|
|
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><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(() =>
|
|
|
|
|
{
|
2024-12-12 16:36:07 +08:00
|
|
|
|
if (num == 1)
|
2024-12-11 14:37:42 +08:00
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
num = 0;
|
|
|
|
|
DiaLogBox2.SetActive(false);
|
|
|
|
|
}
|
2024-12-12 16:36:07 +08:00
|
|
|
|
if (num == 2)
|
2024-12-11 14:37:42 +08:00
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
num = 0;
|
|
|
|
|
DiaLogBox2.SetActive(false);
|
|
|
|
|
}
|
|
|
|
|
});
|
2024-12-12 16:36:07 +08:00
|
|
|
|
FireButton.onClick.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
|
2024-12-12 09:18:00 +08:00
|
|
|
|
FireText.color = new Color(0.75f, 0.75f, 0.75f);
|
|
|
|
|
});
|
2024-12-12 16:36:07 +08:00
|
|
|
|
//<2F><>ɢ˳<C9A2><CBB3><EFBFBD><EFBFBD>ť
|
|
|
|
|
Warn.onClick.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
WarnPanel();
|
|
|
|
|
});
|
2024-12-11 14:37:42 +08:00
|
|
|
|
|
2024-12-12 16:36:07 +08:00
|
|
|
|
#region <EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>Ч
|
|
|
|
|
Number(NO_Student);
|
|
|
|
|
#endregion
|
2024-12-11 14:37:42 +08:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
private void Update()
|
|
|
|
|
{
|
2024-12-12 16:36:07 +08:00
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2024-12-16 17:17:46 +08:00
|
|
|
|
if (Input.GetKeyDown("j"))
|
|
|
|
|
{
|
|
|
|
|
string str = "aaa";
|
|
|
|
|
FixWarnPanelText(str);
|
|
|
|
|
WarnPanel();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (Input.GetKeyDown("k"))
|
|
|
|
|
{
|
|
|
|
|
FixWarnPanelText("aaaa");
|
|
|
|
|
}
|
2024-12-11 14:37:42 +08:00
|
|
|
|
// <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);
|
2024-12-12 16:36:07 +08:00
|
|
|
|
|
2024-12-16 17:17:46 +08:00
|
|
|
|
|
2024-12-12 16:36:07 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Number(Text num)
|
|
|
|
|
{
|
|
|
|
|
StartCoroutine(Num(num));
|
|
|
|
|
}
|
|
|
|
|
IEnumerator Num(Text num)
|
|
|
|
|
{
|
2024-12-16 17:17:46 +08:00
|
|
|
|
while (true)
|
2024-12-12 16:36:07 +08:00
|
|
|
|
{
|
|
|
|
|
num.fontSize = 42;
|
|
|
|
|
yield return new WaitForSeconds(0.5f);
|
|
|
|
|
num.fontSize = 35;
|
|
|
|
|
yield return new WaitForSeconds(0.1f);
|
|
|
|
|
num.fontSize = 30;
|
|
|
|
|
yield return new WaitForSeconds(0.3f);
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-12-12 17:51:05 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><>һ<EFBFBD>ε<EFBFBD><CEB5><EFBFBD>¥<EFBFBD>ݶ<EFBFBD><DDB6><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public void Frist()
|
|
|
|
|
{
|
|
|
|
|
DiaLogBox2?.SetActive(true);
|
|
|
|
|
Close1Panel.SetActive(false);
|
2024-12-12 17:55:05 +08:00
|
|
|
|
|
2024-12-12 17:51:05 +08:00
|
|
|
|
FreePanel.SetActive(true);
|
|
|
|
|
}
|
2024-12-12 16:36:07 +08:00
|
|
|
|
|
|
|
|
|
/// <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;
|
|
|
|
|
// <20><><EFBFBD>հ༶<D5B0><E0BCB6><EFBFBD><EFBFBD>
|
|
|
|
|
initialized();
|
|
|
|
|
}
|
|
|
|
|
#region <EFBFBD><EFBFBD>ɢ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>༶<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><EFBFBD>
|
|
|
|
|
//<2F><><EFBFBD>ݳ<EFBFBD>ʼ<EFBFBD><CABC>
|
2024-12-16 17:17:46 +08:00
|
|
|
|
public void initialized()
|
2024-12-12 16:36:07 +08:00
|
|
|
|
{
|
|
|
|
|
foreach (Transform child in gridLayoutGroup.transform)
|
|
|
|
|
{
|
|
|
|
|
// <20><>ʼ<EFBFBD><CABC>ʱ<EFBFBD><CAB1>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD><C4B1><EFBFBD>
|
|
|
|
|
textFields.Clear();
|
|
|
|
|
Text textComponent = child.GetComponent<Text>();
|
|
|
|
|
if (textComponent != null)
|
|
|
|
|
{
|
|
|
|
|
textFields.Add(textComponent);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// <20><><EFBFBD>հ༶<D5B0><E0BCB6><EFBFBD><EFBFBD>
|
|
|
|
|
SortByClass();
|
|
|
|
|
}
|
2024-12-11 14:37:42 +08:00
|
|
|
|
}
|
2024-12-12 16:36:07 +08:00
|
|
|
|
|
2024-12-16 17:17:46 +08:00
|
|
|
|
// <20><><EFBFBD>հ༶<D5B0><E0BCB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
public void SortByClass()
|
|
|
|
|
{
|
|
|
|
|
// <20><><EFBFBD><EFBFBD>֮ǰ<D6AE>Ƚ<EFBFBD><C8BD><EFBFBD><EFBFBD>༶<EFBFBD><E0BCB6><EFBFBD><EFBFBD>
|
|
|
|
|
textFields = textFields.OrderBy(t => ParseClassNumber(t.text)).ToList();
|
2024-12-12 16:36:07 +08:00
|
|
|
|
|
2024-12-16 17:17:46 +08:00
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD><C4B1><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>ã<EFBFBD>GridLayoutGroup <20><><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
for (int i = 0; i < textFields.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
textFields[i].transform.SetSiblingIndex(i); // <20><><EFBFBD><EFBFBD>˳<EFBFBD><CBB3>
|
2024-12-12 16:36:07 +08:00
|
|
|
|
}
|
2024-12-16 17:17:46 +08:00
|
|
|
|
}
|
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD>༶<EFBFBD>ţ<EFBFBD><C5A3><EFBFBD><EFBFBD><EFBFBD> "4-1<><31>" <20><>Ϊ 4-1
|
|
|
|
|
int ParseClassNumber(string classText)
|
|
|
|
|
{
|
|
|
|
|
// ʹ<><CAB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD> "4-1" <20>İ༶<C4B0><E0BCB6>
|
|
|
|
|
Match match = Regex.Match(classText, @"(\d+)-(\d+)");
|
|
|
|
|
if (match.Success)
|
2024-12-12 16:36:07 +08:00
|
|
|
|
{
|
2024-12-16 17:17:46 +08:00
|
|
|
|
int part1 = int.Parse(match.Groups[1].Value); // <20><>ȡ<EFBFBD><C8A1>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
int part2 = int.Parse(match.Groups[2].Value); // <20><>ȡ<EFBFBD>ڶ<EFBFBD><DAB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
return part1 * 100 + part2; // <20><><EFBFBD>غϳ<D8BA><CFB3><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2024-12-12 16:36:07 +08:00
|
|
|
|
}
|
2024-12-16 17:17:46 +08:00
|
|
|
|
|
|
|
|
|
Debug.LogError($"<22><EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>༶<EFBFBD><E0BCB6>: {classText}");
|
|
|
|
|
return 0; // Ĭ<>Ϸ<EFBFBD><CFB7><EFBFBD> 0<><30><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
}
|
|
|
|
|
|
2024-12-12 16:36:07 +08:00
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
2024-12-16 17:17:46 +08:00
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2024-12-11 14:37:42 +08:00
|
|
|
|
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);
|
2024-12-12 16:36:07 +08:00
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>B<EFBFBD><42><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾλ<CABE>ã<EFBFBD>ͬʱ<CDAC><CAB1><EFBFBD><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>ƶ<EFBFBD>
|
|
|
|
|
panelA.DOAnchorPosX(-panelAMoveDistance, moveDuration).SetEase(Ease.InOutCubic); // <20><><EFBFBD><EFBFBD>Aͬʱ<CDAC>ƶ<EFBFBD>
|
|
|
|
|
bg.transform.Rotate(0, 0, 180f);
|
2024-12-11 14:37:42 +08:00
|
|
|
|
isHidden = false; // <20><><EFBFBD><EFBFBD>״̬Ϊδ<CEAA><CEB4><EFBFBD><EFBFBD>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
// <20><><EFBFBD>ذ<EFBFBD>ť
|
2024-12-12 16:36:07 +08:00
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>B<EFBFBD><42><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>ã<EFBFBD>ͬʱ<CDAC><CAB1><EFBFBD><EFBFBD>A<EFBFBD>ָ<EFBFBD>ԭλ
|
2024-12-11 14:37:42 +08:00
|
|
|
|
buttonRect.DOAnchorPosX(hidePositionX, moveDuration).SetEase(Ease.InOutCubic);
|
2024-12-12 16:36:07 +08:00
|
|
|
|
panelA.DOAnchorPosX(-45f, moveDuration).SetEase(Ease.InOutCubic); // <20><><EFBFBD><EFBFBD>A<EFBFBD>ָ<EFBFBD>ԭλ
|
|
|
|
|
bg.transform.Rotate(0, 0, 180f);
|
2024-12-11 14:37:42 +08:00
|
|
|
|
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;
|
2024-12-12 16:36:07 +08:00
|
|
|
|
case 6:
|
|
|
|
|
break;
|
2024-12-11 14:37:42 +08:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// <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)
|
|
|
|
|
{
|
2024-12-12 16:36:07 +08:00
|
|
|
|
switch (a)
|
2024-12-11 14:37:42 +08:00
|
|
|
|
{
|
|
|
|
|
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;
|
2024-12-12 16:36:07 +08:00
|
|
|
|
case 5:
|
2024-12-11 14:37:42 +08:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
2024-12-12 16:36:07 +08:00
|
|
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2024-12-11 14:37:42 +08:00
|
|
|
|
/// </summary>
|
2024-12-12 16:36:07 +08:00
|
|
|
|
public void OpenFirePanel()
|
2024-12-11 14:37:42 +08:00
|
|
|
|
{
|
2024-12-12 16:36:07 +08:00
|
|
|
|
TipTilte.SetActive(true);
|
|
|
|
|
MapTapPanel.SetActive(true);
|
2024-12-11 14:37:42 +08:00
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
2024-12-12 16:36:07 +08:00
|
|
|
|
/// <20>ر<EFBFBD><D8B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2024-12-11 14:37:42 +08:00
|
|
|
|
/// </summary>
|
2024-12-12 16:36:07 +08:00
|
|
|
|
public void CloseFirePanel()
|
2024-12-11 14:37:42 +08:00
|
|
|
|
{
|
2024-12-12 16:36:07 +08:00
|
|
|
|
TipTilte.SetActive(false);
|
|
|
|
|
MapTapPanel.SetActive(false);
|
2024-12-11 14:37:42 +08:00
|
|
|
|
}
|
2024-12-16 17:17:46 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>뷽<EFBFBD><EBB7BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>
|
|
|
|
|
/// </summary>
|
2024-12-15 17:11:33 +08:00
|
|
|
|
public void InitializeFlee()
|
2024-12-11 14:37:42 +08:00
|
|
|
|
{
|
2024-12-15 17:11:33 +08:00
|
|
|
|
string str;
|
|
|
|
|
List<GameObject> createdItems = new List<GameObject>();
|
|
|
|
|
|
|
|
|
|
// <20><>̬<EFBFBD><CCAC><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>岢<EFBFBD><E5B2A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
for (int i = 0; i < itemCount; i++)
|
2024-12-11 14:37:42 +08:00
|
|
|
|
{
|
2024-12-15 17:11:33 +08:00
|
|
|
|
GameObject newItem = Instantiate(itemPrefab, content3.transform);
|
|
|
|
|
Text left = newItem.transform.Find("Choose_Bg/Choose_BgLeft/Left").GetComponent<Text>();
|
|
|
|
|
Text Right = newItem.transform.Find("Choose_Bg/Choose_BgLeft/Right").GetComponent<Text>();
|
2024-12-16 17:17:46 +08:00
|
|
|
|
left.text = jsonReader.SetUIText(20000);
|
|
|
|
|
str = jsonReader.GetGlobal(1, 90016);
|
|
|
|
|
string[] str1 = str.Split('|');
|
2024-12-15 17:11:33 +08:00
|
|
|
|
Right.text = jsonReader.GetEvacuate(str1[i]);
|
2024-12-16 17:17:46 +08:00
|
|
|
|
Toggle toggle = newItem.gameObject.GetComponent<Toggle>();
|
2024-12-15 17:11:33 +08:00
|
|
|
|
toggle.group = toggleGroup;
|
|
|
|
|
|
|
|
|
|
// <20><EFBFBD><F3B6A8B5><EFBFBD><EFBFBD>¼<EFBFBD>
|
|
|
|
|
int index = i; // <20><>֤ÿ<D6A4><C3BF> Toggle <20>в<EFBFBD>ͬ<EFBFBD><CDAC> index
|
|
|
|
|
toggle.onValueChanged.AddListener((bool isOn) => OnToggleClicked(isOn, index));
|
|
|
|
|
// left.text=js
|
|
|
|
|
createdItems.Add(newItem); // <20><><EFBFBD>´<EFBFBD><C2B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD><D3B5>б<EFBFBD><D0B1><EFBFBD>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9> Fisher-Yates <20>㷨<EFBFBD><E3B7A8>
|
|
|
|
|
System.Random rand = new System.Random();
|
|
|
|
|
int n = createdItems.Count;
|
|
|
|
|
for (int i = n - 1; i > 0; i--)
|
|
|
|
|
{
|
|
|
|
|
int j = rand.Next(i + 1);
|
|
|
|
|
GameObject temp = createdItems[i];
|
|
|
|
|
createdItems[i] = createdItems[j];
|
|
|
|
|
createdItems[j] = temp;
|
2024-12-11 14:37:42 +08:00
|
|
|
|
}
|
2024-12-15 17:11:33 +08:00
|
|
|
|
|
|
|
|
|
// <20><><EFBFBD>մ<EFBFBD><D5B4>Һ<EFBFBD><D2BA><EFBFBD>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
foreach (GameObject item in createdItems)
|
|
|
|
|
{
|
|
|
|
|
item.transform.SetSiblingIndex(createdItems.IndexOf(item)); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
}
|
|
|
|
|
// ǿ<><C7BF>ˢ<EFBFBD>²<EFBFBD><C2B2><EFBFBD>
|
|
|
|
|
LayoutRebuilder.ForceRebuildLayoutImmediate(content3.GetComponent<RectTransform>());
|
2024-12-11 14:37:42 +08:00
|
|
|
|
}
|
2024-12-15 17:11:33 +08:00
|
|
|
|
|
2024-12-11 14:37:42 +08:00
|
|
|
|
/// <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);
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-12-12 16:36:07 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><>ɢ<EFBFBD><C9A2>ʾ
|
|
|
|
|
/// </summary>
|
2024-12-12 09:18:00 +08:00
|
|
|
|
public void WarnPanel()
|
|
|
|
|
{
|
2024-12-12 16:36:07 +08:00
|
|
|
|
if (Command02.activeSelf)
|
2024-12-12 09:18:00 +08:00
|
|
|
|
{
|
|
|
|
|
Command02.SetActive(false);
|
2024-12-12 16:36:07 +08:00
|
|
|
|
isEnd = false;
|
|
|
|
|
StopCoroutine(Flicker());
|
2024-12-12 09:18:00 +08:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Command02.SetActive(true);
|
2024-12-12 16:36:07 +08:00
|
|
|
|
isEnd = true;
|
|
|
|
|
StartCoroutine(Flicker());
|
2024-12-12 09:18:00 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
2024-12-12 16:36:07 +08:00
|
|
|
|
/// <20><>Ч<EFBFBD><D0A7>Я<EFBFBD><D0AF>
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
IEnumerator Flicker()
|
|
|
|
|
{
|
|
|
|
|
while (isEnd)
|
|
|
|
|
{
|
2024-12-16 17:17:46 +08:00
|
|
|
|
//Bg1.color= new Color(1f, 1f, 1f);
|
|
|
|
|
Bg1.sprite = Image1;
|
|
|
|
|
//Bg.color = new Color(1f, 0f, 0f);
|
|
|
|
|
yield return new WaitForSeconds(0.6f);
|
|
|
|
|
//Bg.color = new Color(1f, 1f, 1f);
|
|
|
|
|
//Bg1.color = new Color(1f, 0f, 0f);
|
|
|
|
|
Bg1.sprite = Image2;
|
2024-12-12 16:36:07 +08:00
|
|
|
|
yield return new WaitForSeconds(0.6f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
public void FixWarnPanelText(string str)
|
|
|
|
|
{
|
|
|
|
|
WartipText.text = str;
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
2024-12-12 09:18:00 +08:00
|
|
|
|
/// <20><><EFBFBD>뷽<EFBFBD><EBB7BD>ѡ<EFBFBD><D1A1>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public void DialogboxPanel()
|
|
|
|
|
{
|
2024-12-12 16:36:07 +08:00
|
|
|
|
if (DiaLogBox.activeSelf)
|
2024-12-12 09:18:00 +08:00
|
|
|
|
{
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-12-12 16:36:07 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="str"><3E>ı<EFBFBD><C4B1><EFBFBD><EFBFBD><EFBFBD></param>
|
2024-12-12 09:18:00 +08:00
|
|
|
|
public void CreateWarn(string str)
|
|
|
|
|
{
|
|
|
|
|
GameObject newText = Instantiate(TextPrefab);
|
|
|
|
|
newText.transform.SetParent(content.transform, false);
|
2024-12-12 16:36:07 +08:00
|
|
|
|
Text text = newText.GetComponentInChildren<Text>();
|
2024-12-12 09:18:00 +08:00
|
|
|
|
text.text = str;
|
|
|
|
|
}
|
2024-12-12 16:36:07 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public void PopTip()
|
2024-12-12 09:18:00 +08:00
|
|
|
|
{
|
2024-12-12 16:36:07 +08:00
|
|
|
|
TipPanel.SetActive(true);
|
|
|
|
|
TipText.text = "<22><>ʱ" + TimeText.text + "ѧ<><D1A7><EFBFBD><EFBFBD>ɢ<EFBFBD><C9A2><EFBFBD><EFBFBD>";
|
|
|
|
|
//<2F><><EFBFBD><CDB8><EFBFBD><EFBFBD>ʼ
|
|
|
|
|
TipText.color = new Color(TipText.color.r, TipText.color.g, TipText.color.b, 0f);
|
|
|
|
|
TipBg.color = new Color(TipText.color.r, TipText.color.g, TipText.color.b, 0f);
|
|
|
|
|
StartCoroutine(FadeInOutRoutine());
|
2024-12-12 09:18:00 +08:00
|
|
|
|
}
|
2024-12-12 16:36:07 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><>ʾ<EFBFBD><CABE><EFBFBD>嵭<EFBFBD>뵭<EFBFBD><EBB5AD><EFBFBD><EFBFBD>Я<EFBFBD><D0AF>
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
IEnumerator FadeInOutRoutine()
|
|
|
|
|
{
|
|
|
|
|
isFading = true; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5>뵭<EFBFBD><EBB5AD><EFBFBD><EFBFBD>־
|
|
|
|
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD>
|
|
|
|
|
float elapsedTime = 0f;
|
|
|
|
|
while (elapsedTime < fadeInDuration)
|
|
|
|
|
{
|
|
|
|
|
elapsedTime += Time.deltaTime;
|
|
|
|
|
Color textColor = TipText.color;
|
|
|
|
|
textColor.a = elapsedTime / fadeInDuration; // <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>alphaֵ
|
|
|
|
|
TipText.color = textColor;
|
|
|
|
|
TipBg.color = textColor;
|
|
|
|
|
|
|
|
|
|
yield return null; // <20>ȴ<EFBFBD><C8B4><EFBFBD>һ֡
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// <20><>ʾ<EFBFBD>ı<EFBFBD>һ<EFBFBD><D2BB>ʱ<EFBFBD><CAB1>
|
|
|
|
|
yield return new WaitForSeconds(displayDuration);
|
|
|
|
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD>
|
|
|
|
|
elapsedTime = 0f;
|
|
|
|
|
while (elapsedTime < fadeOutDuration)
|
|
|
|
|
{
|
|
|
|
|
elapsedTime += Time.deltaTime;
|
|
|
|
|
Color textColor = TipText.color;
|
|
|
|
|
textColor.a = 1f - (elapsedTime / fadeOutDuration); // <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>alphaֵ
|
|
|
|
|
TipText.color = textColor;
|
|
|
|
|
TipBg.color = textColor;
|
|
|
|
|
yield return null; // <20>ȴ<EFBFBD><C8B4><EFBFBD>һ֡
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
isFading = false; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5>뵭<EFBFBD><EBB5AD><EFBFBD><EFBFBD>־
|
|
|
|
|
fadeCoroutine = null; // <20><><EFBFBD><EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
TipPanel.SetActive(false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region <EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD>
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><EFBFBD>¥<EFBFBD>ݿڵ<DDBF><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD><C4B1><EFBFBD>Ϣ
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="a">1-<2D><>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>2<EFBFBD>ڶ<EFBFBD><DAB6><EFBFBD><EFBFBD><EFBFBD>3<EFBFBD><33><EFBFBD><EFBFBD><EFBFBD><EFBFBD></param>
|
|
|
|
|
/// <param name="str">¥<>ݿ<EFBFBD><DDBF><EFBFBD>Ϣ</param>
|
|
|
|
|
public void FixStairway(int a, string str)
|
|
|
|
|
{
|
|
|
|
|
switch (a)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
icn_stairway_text_1.text = str;
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
icn_stairway_text_2.text = str;
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
icn_stairway_text_3.text = str;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><EFBFBD><DEB8><EFBFBD>ָ<EFBFBD><D6B8>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֣<EFBFBD><D6A3><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="headImage">ͷ<><CDB7>ͼƬ</param>
|
|
|
|
|
/// <param name="name"><3E><><EFBFBD><EFBFBD></param>
|
|
|
|
|
/// <param name="Message"><3E><><EFBFBD><EFBFBD></param>
|
|
|
|
|
public void FixWarn_Tip(Image headImage, string name, string Message)
|
|
|
|
|
{
|
|
|
|
|
HeadImage = headImage;
|
|
|
|
|
Head_Text.text = name;
|
|
|
|
|
WarnTip_Text.text = Message;
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><EFBFBD><DEB8><EFBFBD>ָ<EFBFBD>ӿ<EFBFBD><D3BF><EFBFBD> <20><>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֣<EFBFBD><D6A3><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="name"><3E><><EFBFBD><EFBFBD></param>
|
|
|
|
|
/// <param name="Message"><3E><><EFBFBD><EFBFBD></param>
|
|
|
|
|
public void FixWarn_Tip(string name, string Message)
|
|
|
|
|
{
|
|
|
|
|
Head_Text.text = name;
|
|
|
|
|
WarnTip_Text.text = Message;
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20>ĵ<DEB8>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD>绰<EFBFBD><E7BBB0>
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="a">1-<2D><><EFBFBD><EFBFBD>ͷ<EFBFBD><CDB7>2-<2D>绰</param>
|
|
|
|
|
/// <param name="Message"><3E>ĵ<DEB8><C4B5>ı<EFBFBD><C4B1><EFBFBD><EFBFBD><EFBFBD></param>
|
|
|
|
|
public void FixMessage(int a, string Message)
|
|
|
|
|
{
|
|
|
|
|
switch (a)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
MessageText.text = Message;
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
MessageText2.text = Message;
|
|
|
|
|
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(int a, string str)
|
|
|
|
|
{
|
|
|
|
|
switch (a)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
Tip_1.text = str;
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
Tip_2.text = str;
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
Tip_3.text = str;
|
|
|
|
|
break;
|
|
|
|
|
case 4:
|
|
|
|
|
Tip_4.text = str;
|
|
|
|
|
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(int a, string str)
|
|
|
|
|
{
|
|
|
|
|
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(int a, string str)
|
|
|
|
|
{
|
|
|
|
|
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>ɹ<EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="a"><3E><><EFBFBD><EFBFBD></param>
|
|
|
|
|
/// <param name="str"><3E>༶</param>
|
|
|
|
|
/// <param name="str2"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7></param>
|
2024-12-16 17:17:46 +08:00
|
|
|
|
public void FixNo(int a, string str, string str2)
|
2024-12-12 16:36:07 +08:00
|
|
|
|
{
|
|
|
|
|
NO_Left_MessageText.text = str;
|
|
|
|
|
NO_Right_MessageText.text = str2;
|
|
|
|
|
NO_Student.text = a.ToString();
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ <20>Ĺ<DEB8><C4B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="str"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></param>
|
|
|
|
|
public void FixArea(string str)
|
|
|
|
|
{
|
|
|
|
|
Area.text = str;
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ <20><EFBFBD>NPC<50><43>
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="str">NPC<50><43></param>
|
|
|
|
|
public void FixNPCName(string str)
|
|
|
|
|
{
|
|
|
|
|
NPCName.text = str;
|
|
|
|
|
}
|
2024-12-16 17:17:46 +08:00
|
|
|
|
#endregion
|
2024-12-15 17:11:33 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʦ<EFBFBD>ķ<EFBFBD><C4B7><EFBFBD>ѡ<EFBFBD><D1A1>
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="isOn"></param>
|
|
|
|
|
/// <param name="index"></param>
|
2024-12-16 17:17:46 +08:00
|
|
|
|
private void OnToggleClicked(bool isOn, int index)
|
2024-12-15 17:11:33 +08:00
|
|
|
|
{
|
|
|
|
|
if (isOn)
|
|
|
|
|
{
|
|
|
|
|
// ִ<>п<EFBFBD><D0BF><EFBFBD><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>
|
|
|
|
|
Debug.Log("Toggle " + index + " is On");
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-12-11 14:37:42 +08:00
|
|
|
|
private void Close()
|
|
|
|
|
{
|
|
|
|
|
DiaLogBox2?.SetActive(false);
|
|
|
|
|
DiaLogBox?.SetActive(false);
|
|
|
|
|
}
|
|
|
|
|
}
|