2024-11-25 17:15:16 +08:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
2024-11-28 22:02:35 +08:00
|
|
|
|
using System.Linq;
|
2024-11-25 17:15:16 +08:00
|
|
|
|
using TMPro;
|
|
|
|
|
using Unity.VisualScripting;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
|
|
public class SelectScenePanel : MonoBehaviour
|
|
|
|
|
{
|
2024-11-28 22:02:35 +08:00
|
|
|
|
[Header("<22><><EFBFBD><EFBFBD>")]
|
|
|
|
|
public GameObject scenePrefab;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼԤ<CDBC><D4A4><EFBFBD><EFBFBD>
|
|
|
|
|
public Transform sceneList;//Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
|
|
|
|
|
public GameObject schoolPrefab;//ѧУ<D1A7><D0A3>ťԤ<C5A5><D4A4><EFBFBD><EFBFBD>
|
|
|
|
|
public Transform schoolList;//ѧУԤ<D0A3><D4A4><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
|
|
|
|
|
public GameObject eventPrefab;//<2F>¼<EFBFBD><C2BC><EFBFBD>ťԤ<C5A5><D4A4><EFBFBD><EFBFBD>
|
|
|
|
|
public Transform eventList;//ѧУԤ<D0A3><D4A4><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
|
|
|
|
|
public ToggleGroup schoolGroup;//ѧУToggleGroup
|
|
|
|
|
public ToggleGroup sceneGroup;//<2F><><EFBFBD><EFBFBD>ToggleGroup
|
|
|
|
|
public ToggleGroup eventGroup;//<2F>¼<EFBFBD>ToggleGroup
|
2024-11-25 17:15:16 +08:00
|
|
|
|
public GameObject scoolSelectBtn;//ѧУѡ<D0A3><D1A1><EFBFBD><EFBFBD>ť
|
|
|
|
|
public GameObject schoolChoiceLable;//ѧУѡ<D0A3><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
public GameObject eventChoiceLable;//<2F>¼<EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2024-11-28 22:02:35 +08:00
|
|
|
|
public List<SchoolInfo> schoolInfoList = new List<SchoolInfo>();//ѧУ<D1A7><D0A3>Ϣ
|
|
|
|
|
public List<EventInfo> eventInfoList = new List<EventInfo>();//<2F>¼<EFBFBD><C2BC><EFBFBD>Ϣ
|
|
|
|
|
public List<SceneItem> sceneItemList = new List<SceneItem>();//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|
|
|
|
public List<Toggle> difficultyList = new List<Toggle>();//<2F><>Ϸ<EFBFBD>Ѷ<EFBFBD>
|
2024-11-27 02:11:27 +08:00
|
|
|
|
public Button continueBtn;
|
2024-11-28 22:02:35 +08:00
|
|
|
|
public Toggle[] toggleList;
|
|
|
|
|
public Toggle[] schooltoggleList;
|
|
|
|
|
public Toggle[] eventToggleList;
|
|
|
|
|
|
2024-11-25 17:15:16 +08:00
|
|
|
|
|
2024-11-28 22:02:35 +08:00
|
|
|
|
[Header("<22><><EFBFBD><EFBFBD>")]
|
2024-11-25 17:15:16 +08:00
|
|
|
|
public int schoolId;
|
|
|
|
|
public string schoolName;
|
2024-11-28 22:02:35 +08:00
|
|
|
|
public string sceneName;
|
2024-11-25 17:15:16 +08:00
|
|
|
|
public int eventId;
|
|
|
|
|
public string eventName;
|
|
|
|
|
public string difficulty;
|
2024-11-28 22:02:35 +08:00
|
|
|
|
public string isBuy;
|
2024-11-25 17:15:16 +08:00
|
|
|
|
// Start is called before the first frame update
|
|
|
|
|
void Start()
|
|
|
|
|
{
|
|
|
|
|
schoolChoiceLable.gameObject.SetActive(true);
|
|
|
|
|
eventChoiceLable.gameObject.SetActive(false);
|
2024-11-28 22:02:35 +08:00
|
|
|
|
InstantiateScenePrefab();
|
|
|
|
|
InstantiateSchoolPrefab();
|
|
|
|
|
InstantiateEventPrefab();
|
|
|
|
|
continueBtn.onClick.AddListener(OnClickContinueBtn);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Update is called once per frame
|
|
|
|
|
void Update()
|
|
|
|
|
{
|
|
|
|
|
IsClick();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//<2F><>̬<EFBFBD><CCAC><EFBFBD>س<EFBFBD><D8B3><EFBFBD>ѡ<EFBFBD><D1A1>Ԥ<EFBFBD><D4A4><EFBFBD><EFBFBD>
|
|
|
|
|
public void InstantiateScenePrefab()
|
|
|
|
|
{
|
|
|
|
|
for (int i = 0; i < 6; i++)
|
|
|
|
|
{
|
|
|
|
|
GameObject slot = GameObject.Instantiate<GameObject>(scenePrefab, sceneList);
|
|
|
|
|
SceneItem item = slot.GetComponent<SceneItem>();
|
|
|
|
|
item.sceneName.text = "<22><><EFBFBD><EFBFBD>" + i;
|
|
|
|
|
if (item.IsOpen)
|
|
|
|
|
{
|
|
|
|
|
item.maskImage.gameObject.SetActive(false);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
item.maskImage.gameObject.SetActive(true);
|
|
|
|
|
}
|
|
|
|
|
Toggle toggle = slot.GetComponent<Toggle>();
|
|
|
|
|
if (toggle != null)
|
|
|
|
|
{
|
|
|
|
|
toggle.group = sceneGroup;
|
|
|
|
|
toggleList[i] = toggle;
|
|
|
|
|
sceneItemList.Add(item);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//<2F><>̬<EFBFBD><CCAC><EFBFBD><EFBFBD>ѧУѡ<D0A3><D1A1>Ԥ<EFBFBD><D4A4><EFBFBD><EFBFBD>
|
|
|
|
|
public void InstantiateSchoolPrefab()
|
|
|
|
|
{
|
2024-11-28 11:56:28 +08:00
|
|
|
|
for (int i = 0; i < 6; i++)
|
2024-11-25 17:15:16 +08:00
|
|
|
|
{
|
|
|
|
|
GameObject slot = GameObject.Instantiate<GameObject>(schoolPrefab, schoolList);
|
2024-11-28 22:02:35 +08:00
|
|
|
|
SchoolInfo item = slot.GetComponent<SchoolInfo>();
|
|
|
|
|
item.schoolName.text = "<22><>ɽ<EFBFBD><C9BD>ѧ";
|
|
|
|
|
item.schoolId = i;
|
2024-11-27 02:11:27 +08:00
|
|
|
|
Toggle toggle = slot.GetComponent<Toggle>();
|
|
|
|
|
|
|
|
|
|
if (toggle != null)
|
|
|
|
|
{
|
|
|
|
|
// <20><> Toggle <20><><EFBFBD>ӵ<EFBFBD> ToggleGroup <20><>
|
2024-11-28 22:02:35 +08:00
|
|
|
|
toggle.group = schoolGroup;
|
2024-11-27 02:11:27 +08:00
|
|
|
|
|
2024-11-28 22:02:35 +08:00
|
|
|
|
// <20><> Toggle <20><><EFBFBD>ӵ<EFBFBD> schooltoggleList <20><>
|
|
|
|
|
schooltoggleList[i] = toggle;
|
|
|
|
|
|
|
|
|
|
// <20><> SchoolInfo <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD> schoolInfos <20>б<EFBFBD><D0B1><EFBFBD>
|
|
|
|
|
schoolInfoList.Add(item);
|
2024-11-27 02:11:27 +08:00
|
|
|
|
}
|
2024-11-25 17:15:16 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-11-28 22:02:35 +08:00
|
|
|
|
//<2F><>̬<EFBFBD><CCAC><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>ѡ<EFBFBD><D1A1>Ԥ<EFBFBD><D4A4><EFBFBD><EFBFBD>
|
|
|
|
|
public void InstantiateEventPrefab()
|
2024-11-25 17:15:16 +08:00
|
|
|
|
{
|
2024-11-28 22:02:35 +08:00
|
|
|
|
for (int i = 0; i < 6; i++)
|
|
|
|
|
{
|
|
|
|
|
GameObject slot = GameObject.Instantiate<GameObject>(eventPrefab, eventList);
|
|
|
|
|
EventInfo item = slot.GetComponent<EventInfo>();
|
|
|
|
|
item.eventName.text = "ͣ<><CDA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
|
|
|
|
item.eventId = i*10;
|
|
|
|
|
Toggle toggle = slot.GetComponent<Toggle>();
|
|
|
|
|
|
|
|
|
|
if (toggle != null)
|
|
|
|
|
{
|
|
|
|
|
// <20><> Toggle <20><><EFBFBD>ӵ<EFBFBD> ToggleGroup <20><>
|
|
|
|
|
toggle.group = schoolGroup;
|
|
|
|
|
toggle.isOn = false;
|
2024-11-28 11:56:28 +08:00
|
|
|
|
|
2024-11-28 22:02:35 +08:00
|
|
|
|
// <20><> Toggle <20><><EFBFBD>ӵ<EFBFBD> schooltoggleList <20><>
|
|
|
|
|
eventToggleList[i] = toggle;
|
|
|
|
|
|
|
|
|
|
// <20><> SchoolInfo <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD> schoolInfos <20>б<EFBFBD><D0B1><EFBFBD>
|
|
|
|
|
eventInfoList.Add(item);
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-11-25 17:15:16 +08:00
|
|
|
|
}
|
2024-11-28 22:02:35 +08:00
|
|
|
|
|
|
|
|
|
//ѧУѡ<D0A3><D1A1>
|
2024-11-25 17:15:16 +08:00
|
|
|
|
public void SelectSchoolBtn()
|
|
|
|
|
{
|
|
|
|
|
SchoolInfo gameObject = GetComponentInChildren<SchoolInfo>();
|
2024-11-28 22:02:35 +08:00
|
|
|
|
foreach (SchoolInfo item in schoolInfoList)
|
2024-11-25 17:15:16 +08:00
|
|
|
|
{
|
2024-11-28 11:56:28 +08:00
|
|
|
|
if (item.gameObject.transform.GetComponent<Toggle>().isOn)
|
2024-11-25 17:15:16 +08:00
|
|
|
|
{
|
|
|
|
|
this.schoolId = item.schoolId;
|
2024-11-28 22:02:35 +08:00
|
|
|
|
this.schoolName = item.schoolName.ToString();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Debug.Log("###############1:" + this.schoolId);
|
|
|
|
|
Debug.Log("###############2:" + this.schoolName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1>
|
|
|
|
|
public void SelectSceneBtn()
|
|
|
|
|
{
|
|
|
|
|
bool sceneSelected = false; // <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>г<EFBFBD><D0B3><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1>
|
|
|
|
|
foreach (SceneItem item in sceneItemList)
|
|
|
|
|
{
|
|
|
|
|
// <20><><EFBFBD>鵱ǰ<E9B5B1><C7B0> Toggle <20>Ƿ<EFBFBD><C7B7><EFBFBD>ѡ<EFBFBD><D1A1>
|
|
|
|
|
if (item.gameObject.transform.GetComponent<Toggle>().isOn)
|
|
|
|
|
{
|
|
|
|
|
// <20><><EFBFBD>ó<EFBFBD><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
this.sceneName = item.sceneName.text; // <20><>ȡ Text <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD>
|
|
|
|
|
sceneSelected = true;
|
|
|
|
|
break; // <20>ҵ<EFBFBD>ѡ<EFBFBD>еij<D0B5><C4B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD>ѭ<EFBFBD><D1AD>
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//IsClick();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//<2F>¼<EFBFBD>ѡ<EFBFBD><D1A1>
|
|
|
|
|
public void SelectEvnentBtn()
|
|
|
|
|
{
|
|
|
|
|
bool eventSelected = false; // <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>г<EFBFBD><D0B3><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1>
|
|
|
|
|
foreach (EventInfo item in eventInfoList)
|
|
|
|
|
{
|
|
|
|
|
// <20><><EFBFBD>鵱ǰ<E9B5B1><C7B0> Toggle <20>Ƿ<EFBFBD><C7B7><EFBFBD>ѡ<EFBFBD><D1A1>
|
|
|
|
|
if (item.gameObject.transform.GetComponent<Toggle>().isOn)
|
|
|
|
|
{
|
|
|
|
|
// <20><><EFBFBD>ó<EFBFBD><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
this.eventName = item.eventName.text; // <20><>ȡ Text <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD>
|
|
|
|
|
eventSelected = true;
|
|
|
|
|
break; // <20>ҵ<EFBFBD>ѡ<EFBFBD>еij<D0B5><C4B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD>ѭ<EFBFBD><D1AD>
|
2024-11-25 17:15:16 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-11-28 22:02:35 +08:00
|
|
|
|
|
2024-11-25 17:15:16 +08:00
|
|
|
|
//<2F>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>Ѷ<EFBFBD>ѡ<EFBFBD><D1A1>
|
|
|
|
|
public void SelectEvent()
|
|
|
|
|
{
|
|
|
|
|
EventInfo eventInfo = GetComponentInChildren<EventInfo>();
|
2024-11-28 22:02:35 +08:00
|
|
|
|
foreach (EventInfo item in eventInfoList)
|
2024-11-25 17:15:16 +08:00
|
|
|
|
{
|
|
|
|
|
if (item.gameObject.transform.GetComponent<Toggle>().isOn)
|
|
|
|
|
{
|
|
|
|
|
this.eventId = item.eventId;
|
2024-11-28 22:02:35 +08:00
|
|
|
|
this.eventName = item.eventName.text;
|
2024-11-25 17:15:16 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2024-11-25 17:27:33 +08:00
|
|
|
|
//Debug.Log("%%%%%%%%%%%%%1:"+ this.eventId);
|
|
|
|
|
//Debug.Log("%%%%%%%%%%%%%2:" + this.eventName);
|
2024-11-25 17:15:16 +08:00
|
|
|
|
}
|
2024-11-28 22:02:35 +08:00
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>
|
|
|
|
|
public void OnRandomEventClick()
|
|
|
|
|
{
|
|
|
|
|
//Debug.Log("&&&&&&&&&&&&&&&&&&&&&&&&&7" + eventInfoList.Count);
|
|
|
|
|
// <20><><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1>һ<EFBFBD><D2BB><EFBFBD>¼<EFBFBD>
|
|
|
|
|
if (eventInfoList.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
int randomIndex = Random.Range(0, eventInfoList.Count);
|
|
|
|
|
|
|
|
|
|
// ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Toggle<6C><65>ѡ<EFBFBD><D1A1>״̬
|
|
|
|
|
foreach (Toggle toggle in eventToggleList)
|
|
|
|
|
{
|
|
|
|
|
// <20>ȼ<EFBFBD><C8BC><EFBFBD>toggle<6C>Ƿ<EFBFBD>Ϊnull
|
|
|
|
|
if (toggle != null)
|
|
|
|
|
{
|
|
|
|
|
toggle.isOn = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ѡ<><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>
|
|
|
|
|
if (eventToggleList[randomIndex] != null)
|
|
|
|
|
{
|
|
|
|
|
eventToggleList[randomIndex].isOn = true;
|
|
|
|
|
this.eventName = eventInfoList[randomIndex].eventName.text; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
Debug.Log("<22><>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>: " + this.eventName);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Debug.LogWarning("<22><><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD> Toggle Ϊ null<6C><6C>");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Debug.LogWarning("<22>¼<EFBFBD><C2BC>б<EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-11-25 17:15:16 +08:00
|
|
|
|
//<2F><>Ϸ<EFBFBD>Ѷ<EFBFBD>ѡ<EFBFBD><D1A1>
|
|
|
|
|
public void SelsctDifficulty()
|
|
|
|
|
{
|
2024-11-25 17:27:33 +08:00
|
|
|
|
auth_createTemplate auth_CreateTemplate = new auth_createTemplate();
|
2024-11-28 11:56:28 +08:00
|
|
|
|
foreach (Toggle item in difficultyList)
|
2024-11-25 17:15:16 +08:00
|
|
|
|
{
|
|
|
|
|
if (item.isOn)
|
|
|
|
|
{
|
|
|
|
|
this.difficulty = item.transform.parent.GetComponentInChildren<Text>().text;
|
2024-11-25 17:27:33 +08:00
|
|
|
|
auth_CreateTemplate.mode = this.difficulty;//<2F><><EFBFBD>ṹ<EFBFBD>塰<EFBFBD>Ѷȡ<D1B6><C8A1><EFBFBD>ֵ
|
2024-11-25 17:15:16 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2024-11-25 17:27:33 +08:00
|
|
|
|
//Debug.Log("%%%%%%%%%%%%%3:" + this.difficulty);
|
2024-11-25 17:15:16 +08:00
|
|
|
|
}
|
2024-11-28 22:02:35 +08:00
|
|
|
|
|
2024-11-25 17:15:16 +08:00
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ť<EFBFBD><C5A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD>
|
2024-11-27 02:11:27 +08:00
|
|
|
|
public void OnClickContinueBtn()
|
2024-11-25 17:15:16 +08:00
|
|
|
|
{
|
2024-11-28 22:02:35 +08:00
|
|
|
|
//IsClick(); // <20><><EFBFBD><EFBFBD> IsClick <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD>ѡ<EFBFBD><D1A1>ѧУ<D1A7>ͳ<EFBFBD><CDB3><EFBFBD>
|
2024-11-25 17:15:16 +08:00
|
|
|
|
SelectSchoolBtn();
|
2024-11-28 22:02:35 +08:00
|
|
|
|
SelectSceneBtn();
|
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧУû<D0A3><C3BB>ѡ<EFBFBD>У<EFBFBD><D0A3><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>
|
|
|
|
|
if (continueBtn.interactable)
|
|
|
|
|
{
|
|
|
|
|
schoolChoiceLable.gameObject.SetActive(false);
|
|
|
|
|
eventChoiceLable.gameObject.SetActive(true);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Debug.Log("û<><C3BB>ѡ<EFBFBD><EFBFBD><F1B3A1BE><EFBFBD>ѧУ<D1A7><D0A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ť<EFBFBD><C5A5><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD>");
|
|
|
|
|
}
|
2024-11-28 11:56:28 +08:00
|
|
|
|
}
|
2024-11-28 22:02:35 +08:00
|
|
|
|
|
2024-11-25 17:15:16 +08:00
|
|
|
|
//<2F>ύ<EFBFBD><E1BDBB>ť<EFBFBD><C5A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD>ݺ<EFBFBD><DDBA><EFBFBD><EFBFBD>ؽ<EFBFBD><D8BD><EFBFBD>
|
|
|
|
|
public void SubmitBtn()
|
|
|
|
|
{
|
|
|
|
|
SelectEvent();
|
|
|
|
|
SelsctDifficulty();
|
2024-11-28 22:02:35 +08:00
|
|
|
|
SelectEvnentBtn();
|
2024-11-25 17:15:16 +08:00
|
|
|
|
this.gameObject.SetActive(false);
|
|
|
|
|
}
|
2024-11-28 22:02:35 +08:00
|
|
|
|
|
2024-11-27 02:11:27 +08:00
|
|
|
|
//ͨ<><CDA8><EFBFBD>ж<EFBFBD>Toggle<6C><65>IsOn<4F>Ƿ<C7B7><F1B1BBB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>жϼ<D0B6><CFBC><EFBFBD><EFBFBD><EFBFBD>ť<EFBFBD>Ƿ<EFBFBD><C7B7>û<EFBFBD>
|
|
|
|
|
public void IsClick()
|
|
|
|
|
{
|
|
|
|
|
bool anyToggleSelected = false;
|
2024-11-28 22:02:35 +08:00
|
|
|
|
// // <20><><EFBFBD>鳡<EFBFBD><E9B3A1>ѡ<EFBFBD><D1A1>
|
2024-11-27 02:11:27 +08:00
|
|
|
|
foreach (Toggle toggle in toggleList)
|
|
|
|
|
{
|
|
|
|
|
if (toggle.isOn)
|
|
|
|
|
{
|
|
|
|
|
anyToggleSelected = true;
|
2024-11-28 22:02:35 +08:00
|
|
|
|
break; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Toggle <20><>ѡ<EFBFBD>У<EFBFBD>ֹͣ<CDA3><D6B9><EFBFBD><EFBFBD>
|
2024-11-27 02:11:27 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2024-11-28 22:02:35 +08:00
|
|
|
|
// //<2F><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD> Toggle <20><>ѡ<EFBFBD>У<EFBFBD><D0A3><EFBFBD><EFBFBD><EFBFBD> ContinueBtn <20>Ƿ<EFBFBD><C7B7>ɽ<EFBFBD><C9BD><EFBFBD>
|
2024-11-27 02:11:27 +08:00
|
|
|
|
if (continueBtn != null)
|
|
|
|
|
{
|
2024-11-28 22:02:35 +08:00
|
|
|
|
Debug.Log(anyToggleSelected);
|
2024-11-27 02:11:27 +08:00
|
|
|
|
continueBtn.interactable = anyToggleSelected; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD>е<EFBFBD> Toggle<6C><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ť<EFBFBD>ɽ<EFBFBD><C9BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɽ<F2B2BBBF><C9BD><EFBFBD>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Debug.LogError("ContinueBtn <20><>ť<EFBFBD><C5A5><EFBFBD><EFBFBD>δ<EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD>");
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-11-28 22:02:35 +08:00
|
|
|
|
}
|