首次提交

This commit is contained in:
Bob.Song
2026-03-05 18:07:55 +08:00
commit e125bb869e
4534 changed files with 563920 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: b5d30c3ef7804f5e9f690e364ef1afe9
timeCreated: 1748923189

View File

@@ -0,0 +1,43 @@
/**本脚本为自动生成每次生成会覆盖请勿手动修改生成插件文档及项目地址https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
using FairyGUI;
using FairyGUI.Utils;
using NBC;
namespace NBF
{
public partial class HomeButtonGroups
{
public const string URL = "ui://hxr7rc7plvqln";
public GButton BtnGo;
public GButton BtnMake;
public GButton BtnExit;
public GButton BtnSettings;
public GButton BtnFishBag;
public GButton BtnBag;
public GButton BtnMap;
public GButton BtnPass;
public GButton BtnMission;
public GButton BtnTournament;
public override void ConstructFromXML(XML xml)
{
base.ConstructFromXML(xml);
BtnGo = (GButton)GetChild("BtnGo");
BtnMake = (GButton)GetChild("BtnMake");
BtnExit = (GButton)GetChild("BtnExit");
BtnSettings = (GButton)GetChild("BtnSettings");
BtnFishBag = (GButton)GetChild("BtnFishBag");
BtnBag = (GButton)GetChild("BtnBag");
BtnMap = (GButton)GetChild("BtnMap");
BtnPass = (GButton)GetChild("BtnPass");
BtnMission = (GButton)GetChild("BtnMission");
BtnTournament = (GButton)GetChild("BtnTournament");
OnInited();
UILanguage.TrySetComponentLanguage(this);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 008c0b556690f1a4f9ea76cb05b6746e

View File

@@ -0,0 +1,49 @@
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
using UnityEngine;
using FairyGUI;
using NBC;
namespace NBF
{
public partial class HomeButtonGroups : GComponent
{
private void OnInited()
{
this.AutoAddClick(OnClick);
}
private void OnClick(GComponent btn)
{
if (btn == BtnExit)
{
MessageBox.Show("确定退出吗?", (b) =>
{
if (b) Application.Quit();
});
}
else if (btn == BtnSettings)
{
SettingPanel.Show();
}
else if (btn == BtnBag)
{
BagPanel.Show();
}
else if (btn == BtnFishBag)
{
// FishBagPanel.Show();
FishingShopPanel.Show();
}
else if (btn == BtnMake)
{
BagSlotPanel.Show();
// MakePanel.Show();
}
else if (btn == BtnMap)
{
MapPanel.Show();
}
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 52070c9a16d995346a51eb093365c170

View File

@@ -0,0 +1,32 @@
/**本脚本为自动生成每次生成会覆盖请勿手动修改生成插件文档及项目地址https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
using FairyGUI;
using FairyGUI.Utils;
using NBC;
using System.Collections.Generic;
namespace NBF
{
/// <summary> </summary>
public partial class HomePanel
{
public GObject this[string aKey] => ContentPane.GetChild(aKey);
public override string UIPackName => "Main";
public override string UIResName => "HomePanel";
[AutoFind(Name = "Back")]
public UIBlurBackground Back;
[AutoFind(Name = "Pages")]
public GComponent Pages;
[AutoFind(Name = "Menu")]
public CommonMenu Menu;
public override string[] GetDependPackages(){ return new string[] {"Common","CommonNew"}; }
public static void Show(object param = null){ UI.Inst.OpenUI<HomePanel>(param); }
public static void Hide(){ UI.Inst.HideUI<HomePanel>(); }
public static void Del(){ UI.Inst.DestroyUI<HomePanel>(); }
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: a0a04e215aee16649989877727ea91ad

View File

@@ -0,0 +1,106 @@
// 本脚本只在不存在时会生成一次。已存在不会再次生成覆盖
using System.Collections.Generic;
using FairyGUI;
using UnityEngine;
using NBC;
using UIPanel = NBC.UIPanel;
namespace NBF
{
public partial class HomePanel : UIPanel
{
private string[] PageNames = new[] { "HomeMainPage", "HomeActivityPage", "HomeRankPage" };
private List<HomePageBase> _pages = new List<HomePageBase>();
private HomePageBase _currentPage;
private List<TabItemData> tabList = new List<TabItemData>();
protected override void OnInit()
{
base.OnInit();
foreach (var group in PageNames)
{
var tab = new TabItemData
{
// Name = group
};
tabList.Add(tab);
}
Menu.OnTabChange += ChangeTab;
}
protected override void OnShow()
{
InputManager.Instance.On(this);
Menu.SetTabs(tabList);
ChangeTab(0);
}
#region UI事件
[InputInvoke(InputDef.UI.Back, UIInputButtonShowMode.BottomRight)]
private void OnBack()
{
Hide();
}
#endregion
#region Tab切换
private void ChangeTab(int index)
{
if (index < 0) return;
Log.Info($"Change tab index={index}");
foreach (var page in _pages)
{
page.Hide();
}
var nowPage = GetPage(index);
if (nowPage != null)
{
nowPage.Show(this);
_currentPage = nowPage;
}
}
private HomePageBase GetPage(int index)
{
var page = _pages.Find(t => t.Page == index);
if (page == null)
{
var pageName = PageNames[index];
var pageObject = UIPackage.CreateObject(UIPackName, pageName);
if (pageObject is HomePageBase homePage)
{
Pages.AddChild(homePage);
_pages.Add(homePage);
return homePage;
}
return null;
}
return page;
}
#endregion
protected override void OnHide()
{
InputManager.Instance.Off(this);
}
protected override void OnDestroy()
{
base.OnDestroy();
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: c861edcf3de96ad479e0496632f0cd98

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 1f5d43fc98c14648867dc3b696917e65
timeCreated: 1748923139

View File

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

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 5cee4ebc54c0f434f9443cee69971ab3

View File

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

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 7341727571ae65c4bbc3ce2bd9a94e8b

View File

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

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 044cd5f648db2c94ea89ef77f1891ed4

View File

@@ -0,0 +1,74 @@
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
using System.Collections.Generic;
using FairyGUI;
namespace NBF
{
public partial class HomeMainPage : HomePageBase
{
private ButtonNavigate navigate;
private void OnInited()
{
List<GButton> buttons = new List<GButton>();
var children = OpGroup.GetChildren();
foreach (var child in children)
{
if (child is GButton button)
{
buttons.Add(button);
}
}
// buttons.Add(BtnTest);
navigate = new ButtonNavigate(buttons);
}
protected override void OnShow()
{
InputManager.OnUICanceled += OnUICanceled;
// Model.LoadAsset(0);
// Model.SetBackground(Panel.Back.GetChild("back"));//, Panel.Back.GetChild("icon")
}
protected override void OnHide()
{
InputManager.OnUICanceled -= OnUICanceled;
}
private void OnUICanceled(string action)
{
if (!Panel.IsTop) return;
if (action == InputDef.UI.SubPrev)
{
}
else if (action == InputDef.UI.SubNext)
{
}
else if (action == InputDef.UI.Up)
{
navigate.Up();
}
else if (action == InputDef.UI.Down)
{
navigate.Down();
}
else if (action == InputDef.UI.Right)
{
navigate.Right();
}
else if (action == InputDef.UI.Left)
{
navigate.Left();
}
else if (action == InputDef.UI.Enter)
{
navigate.Click();
}
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 648dd38953354c94a89c7c23d24abeb3

View File

@@ -0,0 +1,48 @@
using FairyGUI;
namespace NBF
{
public abstract class HomePageBase : GComponent
{
public int Page;
public HomePanel Panel;
public void Show(HomePanel panel)
{
Panel = panel;
ShowAnimation();
OnShow();
}
public void Hide()
{
if (visible)
{
HideAnimation();
OnHide();
}
}
#region Anim
private void ShowAnimation()
{
visible = true;
alpha = 0;
GTween.Kill(this);
TweenFade(1, 0.5f);
}
private void HideAnimation()
{
GTween.Kill(this);
TweenFade(0, 0.2f).OnComplete(() => { visible = false; });
}
#endregion
protected abstract void OnShow();
protected abstract void OnHide();
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: fb0a4fb73e0c4eafa11ab8028331637b
timeCreated: 1748925820

View File

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

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: b909a0d4f6fa0b441bd779977ab6403a

View File

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

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 40506befb27a31a4786085ec5416efc7

View File

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

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 06d572bce2eeaf24d8a2d235976dc02c

View File

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

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 1b12895a3e4e7fb4287cbf7a026d7887