客户端代码修改提交

This commit is contained in:
2025-10-14 17:58:49 +08:00
parent c3284032cc
commit 7f599ba51d
27 changed files with 294 additions and 43 deletions

View File

@@ -0,0 +1,27 @@
/**本脚本为自动生成每次生成会覆盖请勿手动修改生成插件文档及项目地址https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
using FairyGUI;
using FairyGUI.Utils;
using NBC;
namespace NBF
{
public partial class BagItem
{
public const string URL = "ui://hxr7rc7puq3a1h";
public GImage back;
public GImage ba;
public override void ConstructFromXML(XML xml)
{
base.ConstructFromXML(xml);
back = (GImage)GetChild("back");
ba = (GImage)GetChild("ba");
OnInited();
UILanguage.TrySetComponentLanguage(this);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 3fa85a75ea9865f438ee246e23aefc66

View File

@@ -0,0 +1,15 @@
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
using UnityEngine;
using FairyGUI;
using NBC;
namespace NBF
{
public partial class BagItem : GButton
{
private void OnInited()
{
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 23a4348047aba5743b09c9d65e404a93

View File

@@ -1,7 +1,9 @@
// 本脚本只在不存在时会生成一次。已存在不会再次生成覆盖
using System.Collections.Generic;
using UnityEngine;
using NBC;
using NBF.Fishing2;
namespace NBF
{
@@ -16,6 +18,24 @@ namespace NBF
{
Game.Input.OnUICanceled += OnUICanceled;
UseBottomMenu();
List<TabItemData> tabItemList = new List<TabItemData>();
var role = App.Main.GetComponent<Role>();
var roleBag = role.GetComponent<RoleBag>();
var dic = roleBag.GetItemsByType();
foreach (var (type, list) in dic)
{
TabItemData tabItem = new TabItemData
{
Key = type.ToString()
};
tabItem.Items.AddRange(list);
tabItemList.Add(tabItem);
}
ItemList.SetPanel(this);
ItemList.SetData(tabItemList, true, true);
}
private void OnUICanceled(string action)