33 lines
1.1 KiB
C#
33 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
public static class UILoadConfig
|
|
{
|
|
private static readonly Dictionary<string, string> _panelPathes = new Dictionary<string, string>()
|
|
{
|
|
{ "SplashUI" , "UI/SplashUI" },
|
|
{ "MainUIPanel" , "UI/MainUI" },
|
|
{ "StartPanel" , "UI/StartPanel" },
|
|
{ "PlanSelectPopup" , "UI/Popup" },
|
|
{ "UserSettingPanel" , "UI/UserSetting" },
|
|
{ "ActionListUIPanel" , "UI/ActionListUI" },
|
|
{ "ActionGuideVideoPanel" , "UI/ActionGuideVideoPanel" },
|
|
{ "GuideUI" , "UI/GuideUI" },
|
|
{ "ClearingSettlementUI" , "UI/ClearingSettlementUI" },
|
|
{ "HudUI" , "UI/HUDRoot" },
|
|
{ "MeditationVideoUI" , "UI/MeditationVideoPanel" },
|
|
{ "FaceDetectUI" , "UI/FaceDetectUI" },
|
|
{ "TestUI" , "UI/TestUI" },
|
|
};
|
|
|
|
public static string GetPath(string typeName)
|
|
{
|
|
//从配置文件中读取
|
|
if (!_panelPathes.TryGetValue(typeName, out var path))
|
|
{
|
|
throw new Exception($"Panel {typeName} not found");
|
|
}
|
|
|
|
return path;
|
|
}
|
|
} |