CTT/Unity/Assets/HotfixView/Helper/CheatHelper.cs

49 lines
1.6 KiB
C#

using ET;
using System;
using System.Collections.Generic;
namespace ET
{
public class CheatHelper
{
public static void OpenUI()
{
//if (!(FUIComponent.Instance.Get(FUIPackage.Common_CheatUI) is FUI_CheatUI ui))
//{
// ui = FUI_CheatUI.CreateInstance(FUIComponent.Instance);
// ui.Name = FUIPackage.Common_CheatUI;
// FUIComponent.Instance.Add(ui, true);
//}
//var window = ui.GetOrAddComponent<FUIWindowComponent>();
//if (window.IsShowing)
//{
// return;
//}
//window.Show();
//window.Window.Center();
//ui.m_btnSend.self.onClick.Set(async() =>
//{
//C2M_Cheat cheat = new C2M_Cheat();
//if (int.TryParse(ui.m_txtLevel.text, out var level))
//{
//}
//cheat.Level = level;
//if (int.TryParse(ui.m_txtEquip.text, out var hasEquip))
//{
//}
//cheat.IsAddEquip = hasEquip == 1;
//if (int.TryParse(ui.m_txtGoods.text, out var hasGoods))
//{
//}
//cheat.IsAddGoods = hasGoods == 1;
//if (int.TryParse(ui.m_txtMetarials.text, out var hasMetarials))
//{
//}
//cheat.IsAddMetarils = hasMetarials == 1;
//await zoneScene.GetComponent<SessionComponent>().Call<M2C_Cheat>(cheat);
//});
}
}
}