提交修改

This commit is contained in:
2025-10-20 00:00:56 +08:00
parent 983203f603
commit 4ee5d0885c
292 changed files with 14032 additions and 78 deletions

View File

@@ -1,4 +1,7 @@
namespace NBF.Utils
using FairyGUI;
using NBC;
namespace NBF.Utils
{
public static class ItemHelper
{
@@ -6,5 +9,31 @@
{
return (ItemType)(id / 10000);
}
public static string GetName(this uint id)
{
return Lan.Get($"Name_{id}");
}
public static string GetDesc(this uint id)
{
return Lan.Get($"Desc_{id}");
}
public static string GetIcon(this uint id)
{
//Assets/Resources/Icons/baitfrog.png
return $"Icons/{id}";
}
public static void SetIcon(this GLoader loader, uint id)
{
loader.url = id.GetIcon();
}
public static void SetIcon(this GComponent loader, uint id)
{
loader.icon = id.GetIcon();
}
}
}