首次提交

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,46 @@
/**本脚本为自动生成每次生成会覆盖请勿手动修改生成插件文档及项目地址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 FishingPanel
{
public GObject this[string aKey] => ContentPane.GetChild(aKey);
public override string UIPackName => "Fishing";
public override string UIResName => "FishingPanel";
[AutoFind(Name = "throwCtrl")]
public Controller throwCtrl;
[AutoFind(Name = "fishingState")]
public Controller fishingState;
[AutoFind(Name = "driveType")]
public Controller driveType;
[AutoFind(Name = "ThrowProgress")]
public GProgressBar ThrowProgress;
[AutoFind(Name = "TextFPS")]
public GTextField TextFPS;
[AutoFind(Name = "TextTime")]
public GLabel TextTime;
[AutoFind(Name = "FishingState")]
public FishingStateInfo FishingState;
[AutoFind(Name = "Interactive")]
public InteractiveTag Interactive;
[AutoFind(Name = "OperationTips")]
public GList OperationTips;
[AutoFind(Name = "Team")]
public FishingTeam Team;
public override string[] GetDependPackages(){ return new string[] {"Common"}; }
public static void Show(object param = null){ UI.Inst.OpenUI<FishingPanel>(param); }
public static void Hide(){ UI.Inst.HideUI<FishingPanel>(); }
public static void Del(){ UI.Inst.DestroyUI<FishingPanel>(); }
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 93d7d712d91923540b1264791e706922

View File

@@ -0,0 +1,77 @@
// 本脚本只在不存在时会生成一次。已存在不会再次生成覆盖
using System.Globalization;
using UnityEngine;
using NBC;
namespace NBF
{
public partial class FishingPanel : UIPanel
{
protected override void OnInit()
{
IsShowCursor = false;
}
protected override void OnShow()
{
InputManager.OnUICanceled += OnUICanceled;
InputManager.OnInteractiveObjectAction += OnInteractiveObjectAction;
InputManager.OnPlayerCanceled += OnPlayerCanceled;
// InputManager.OnUseAction += OnUseAction;
// InputManager.OnUse2Action += OnUse2Action;
}
protected override void OnUpdate()
{
if (!SceneSettings.Instance) return;
TextFPS.text = SceneSettings.Instance.FPS.ToString(CultureInfo.InvariantCulture);
}
private void OnInteractiveObjectAction(InteractiveObject interactiveObject)
{
if (interactiveObject != null)
{
Interactive.visible = true;
Interactive.SetData(interactiveObject);
}
else
{
Interactive.visible = false;
}
}
private void OnUICanceled(string action)
{
if (action == InputDef.UI.Back)
{
if (!IsTop) return;
// HomePanel.Show();
}
}
private void OnPlayerCanceled(string action)
{
if (Interactive.visible)
{
if (action == "Use1")
{
Interactive.Use1();
}
else if (action == "Use2")
{
Interactive.Use2();
}
}
}
protected override void OnHide()
{
base.OnHide();
InputManager.OnUICanceled -= OnUICanceled;
InputManager.OnInteractiveObjectAction -= OnInteractiveObjectAction;
InputManager.OnUICanceled -= OnPlayerCanceled;
}
}
}

View File

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

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 FishingPower
{
public const string URL = "ui://682kb9n0o0hz1n";
public GImage Bar;
public override void ConstructFromXML(XML xml)
{
base.ConstructFromXML(xml);
Bar = (GImage)GetChild("Bar");
OnInited();
UILanguage.TrySetComponentLanguage(this);
}
}
}

View File

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

View File

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

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 47254356d93308a408f169217efa0272

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 FishingStateInfo
{
public const string URL = "ui://682kb9n0fcfg1o";
public FishingPower Power;
public GTextField TextTitle;
public override void ConstructFromXML(XML xml)
{
base.ConstructFromXML(xml);
Power = (FishingPower)GetChild("Power");
TextTitle = (GTextField)GetChild("TextTitle");
OnInited();
UILanguage.TrySetComponentLanguage(this);
}
}
}

View File

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

View File

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

View File

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

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 InteractiveTag
{
public const string URL = "ui://682kb9n0fcfg1p";
public GList List;
public override void ConstructFromXML(XML xml)
{
base.ConstructFromXML(xml);
List = (GList)GetChild("List");
OnInited();
UILanguage.TrySetComponentLanguage(this);
}
}
}

View File

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

View File

@@ -0,0 +1,74 @@
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
using System.Collections.Generic;
using System.Reflection;
using UnityEngine;
using FairyGUI;
using NBC;
namespace NBF
{
public partial class InteractiveTag : GLabel
{
private InteractiveObject _interactiveObject;
private InteractiveData _interactiveData;
private void OnInited()
{
}
public void SetData(InteractiveObject interactiveObject)
{
_interactiveObject = interactiveObject;
List.RemoveChildrenToPool();
var interactiveType = GameDef.InteractiveDataList.Find(t => t.Type == interactiveObject.Type);
if (interactiveType != null)
{
_interactiveData = interactiveType;
if (!string.IsNullOrEmpty(interactiveType.Use1))
{
var item1 = List.AddItemFromPool().asLabel;
item1.title = "E - " + interactiveType.Use1Title;
}
if (!string.IsNullOrEmpty(interactiveType.Use2))
{
var item2 = List.AddItemFromPool().asLabel;
item2.title = "Y - " + interactiveType.Use2Title;
}
var iconUrl = UIPackage.GetItemURL("Common", interactiveType.Icon);
icon = iconUrl;
title = interactiveType.Name;
}
}
public void Use1()
{
if (string.IsNullOrEmpty(_interactiveData.Use1)) return;
Debug.Log(_interactiveData.Use1);
if (_interactiveObject.Type == UIDef.InteractiveType.Boat)
{
//上船
Debug.Log("上船===");
// var boat = _interactiveObject.gameObject.GetComponent<Boat>();
// Fishing.Inst.Player.SelfPlayer.EnterBoat(boat);
// Fishing.Inst.Player
}
else if (_interactiveObject.Type == UIDef.InteractiveType.FishingShop)
{
FishingShopPanel.Show();
}
}
public void Use2()
{
if (string.IsNullOrEmpty(_interactiveData.Use2)) return;
Debug.Log(_interactiveData.Use2);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 04d94697f36267345bce12ab05cbb3d2

View File

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

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 38ea73cd713fc09459c15a7c38ba7fee

View File

@@ -0,0 +1,36 @@
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
using UnityEngine;
using FairyGUI;
using NBC;
namespace NBF
{
public partial class WeatherInfo : GLabel
{
private int _count;
private void OnInited()
{
}
protected override void OnUpdate()
{
base.OnUpdate();
UpdateWeather();
}
private void UpdateWeather(bool force = false)
{
_count++;
if (force)
{
_count = 30;
}
if (_count < 30) return;
_count = 0;
TextTime.text = GameTimer.gameTimeString;
}
}
}

View File

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