提交
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
CommonBinder.BindAll();
|
||||
FishingBinder.BindAll();
|
||||
MainBinder.BindAll();
|
||||
ShopBinder.BindAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
13
Assets/Scripts/UI/Binders/ShopBinder.cs
Normal file
13
Assets/Scripts/UI/Binders/ShopBinder.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
/**注册组件绑定关系。本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
|
||||
|
||||
using FairyGUI;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public class ShopBinder
|
||||
{
|
||||
public static void BindAll()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Binders/ShopBinder.cs.meta
Normal file
2
Assets/Scripts/UI/Binders/ShopBinder.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f579b85674067d740ba424bcc5da406d
|
||||
@@ -4,6 +4,7 @@ using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
@@ -48,11 +49,14 @@ namespace NBF
|
||||
public void Use1()
|
||||
{
|
||||
if (string.IsNullOrEmpty(_interactiveData.Use1)) return;
|
||||
Debug.Log(_interactiveData.Use1);
|
||||
UI.Inst.OpenUI<FishingShop>();
|
||||
}
|
||||
|
||||
public void Use2()
|
||||
{
|
||||
if (string.IsNullOrEmpty(_interactiveData.Use2)) return;
|
||||
Debug.Log(_interactiveData.Use2);
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/UI/Shops.meta
Normal file
3
Assets/Scripts/UI/Shops.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2bcd18877a1d471b97572c04d7e5e02a
|
||||
timeCreated: 1747753015
|
||||
22
Assets/Scripts/UI/Shops/FishingShop.Designer.cs
generated
Normal file
22
Assets/Scripts/UI/Shops/FishingShop.Designer.cs
generated
Normal file
@@ -0,0 +1,22 @@
|
||||
/**本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址: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 FishingShop
|
||||
{
|
||||
public GObject this[string aKey] => ContentPane.GetChild(aKey);
|
||||
[AutoFind(Name = "Banner")]
|
||||
public GLabel Banner;
|
||||
[AutoFind(Name = "BtnClose")]
|
||||
public GButton BtnClose;
|
||||
public override string[] GetDependPackages(){ return new string[] {"Common"}; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Shops/FishingShop.Designer.cs.meta
Normal file
2
Assets/Scripts/UI/Shops/FishingShop.Designer.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 77b9a0646693d344b8dd031f4537c3c8
|
||||
44
Assets/Scripts/UI/Shops/FishingShop.cs
Normal file
44
Assets/Scripts/UI/Shops/FishingShop.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
// 本脚本只在不存在时会生成一次。已存在不会再次生成覆盖
|
||||
|
||||
using FairyGUI;
|
||||
using UnityEngine;
|
||||
using NBC;
|
||||
using UIPanel = NBC.UIPanel;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class FishingShop : UIPanel
|
||||
{
|
||||
public override string UIPackName => "Shop";
|
||||
public override string UIResName => "FishingShop";
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
base.OnInit();
|
||||
this.AutoAddClick(OnClick);
|
||||
}
|
||||
|
||||
protected override void OnShow()
|
||||
{
|
||||
base.OnShow();
|
||||
}
|
||||
|
||||
private void OnClick(GComponent btn)
|
||||
{
|
||||
if (btn == BtnClose)
|
||||
{
|
||||
Hide();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
base.OnHide();
|
||||
}
|
||||
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
base.OnDestroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Shops/FishingShop.cs.meta
Normal file
2
Assets/Scripts/UI/Shops/FishingShop.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b9c7e605b14059445a8598c3cc8d3997
|
||||
Reference in New Issue
Block a user