38 lines
1.4 KiB
C#
38 lines
1.4 KiB
C#
using System.Collections;
|
||
using System.Collections.Generic;
|
||
using UnityEngine;
|
||
|
||
public class UI_DeviceItem : BaseItem
|
||
{
|
||
/// <summary>
|
||
/// É豸Id
|
||
/// </summary>
|
||
public int deviceId;
|
||
|
||
protected override void OnClick(string btnName)
|
||
{
|
||
switch (btnName)
|
||
{
|
||
case "Button_Device":
|
||
GameManager.StudyOrPracticeMgr.deviceId = deviceId;
|
||
GameManager.UIMgr.ShowPanel<UI_LoadingPanel>(E_UI_Layer.System, (panel) =>
|
||
{
|
||
panel.Init();
|
||
GameManager.EventMgr.EventTrigger<float>(Enum_EventType.UpdateProgress, 0.1f);
|
||
GameManager.ScenesMgr.LoadSceneAsyn("03_OfficeScene", () =>
|
||
{
|
||
GameManager.EventMgr.EventTrigger<float>(Enum_EventType.UpdateProgress, 0.4f);
|
||
GameManager.UIMgr.ShowPanel<UI_MainTitlePanel>(E_UI_Layer.Mid, (panel) =>
|
||
{
|
||
panel.Init();
|
||
GameManager.EventMgr.EventTrigger<float>(Enum_EventType.UpdateProgress, 0.5f);
|
||
GameManager.UIMgr.HidePanel<UI_SelectModeOrDeviceTitlePanel>();
|
||
GameManager.UIMgr.HidePanel<UI_SelectDevicePanel>();
|
||
});
|
||
});
|
||
});
|
||
break;
|
||
}
|
||
}
|
||
}
|