This commit is contained in:
Bob.Song
2026-04-29 17:00:10 +08:00
parent d552a83ccb
commit a8f3569787
6 changed files with 19 additions and 10 deletions

View File

@@ -402,10 +402,6 @@ MonoBehaviour:
showDebugInfo: 1 showDebugInfo: 1
defaultTransitionSpeed: 2 defaultTransitionSpeed: 2
LinelenghtDiferent: 0 LinelenghtDiferent: 0
lengthLimitTolerance: 0.01
breakStretchThreshold: 0.3
breakStretchPercentMinThreshold: 0.06
breakLimitDuration: 3
--- !u!1 &1858052053854210 --- !u!1 &1858052053854210
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -781,7 +777,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7f840e1966fd4c2aafe2f37ca260cdd2, type: 3} m_Script: {fileID: 11500000, guid: 7f840e1966fd4c2aafe2f37ca260cdd2, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: Assembly-CSharp::NBF.FLineLogicNode m_EditorClassIdentifier: Assembly-CSharp::NBF.FLineLogicNode
NodeType: 1 NodeType: 0
rope: {fileID: 0} rope: {fileID: 0}
preRigidbody: {fileID: 0} preRigidbody: {fileID: 0}
--- !u!1 &3739175077773299312 --- !u!1 &3739175077773299312

View File

@@ -133,7 +133,7 @@ namespace NBF
private void Update() private void Update()
{ {
LinelenghtDiferent = GetLineDistance(); // LinelenghtDiferent = GetLineDistance();
//非钓鱼状态 //非钓鱼状态
if (Rod) Rod.Tension = Mathf.Clamp(LinelenghtDiferent, 0f, 0.05f); if (Rod) Rod.Tension = Mathf.Clamp(LinelenghtDiferent, 0f, 0.05f);

View File

@@ -1,4 +1,5 @@
using System.Collections.Generic; using System.Collections.Generic;
using Fantasy.Async;
using UnityEngine; using UnityEngine;
namespace NBF namespace NBF
@@ -15,12 +16,18 @@ namespace NBF
public Player Owner; public Player Owner;
public virtual void Init(Player player, int configId, List<int> bindItems) public virtual async FTask Init(Player player, int configId, List<int> bindItems)
{ {
Owner = player; Owner = player;
ConfigID = configId; ConfigID = configId;
BindItems.Clear(); BindItems.Clear();
BindItems.AddRange(bindItems); BindItems.AddRange(bindItems);
await OnInit();
}
protected virtual async FTask OnInit()
{
await FTask.CompletedTask;
} }
} }
} }

View File

@@ -156,7 +156,7 @@ namespace NBF
yield return 1; yield return 1;
} }
public async FTask InitRod() protected override async FTask OnInit()
{ {
transform.localPosition = Vector3.zero; transform.localPosition = Vector3.zero;
transform.localRotation = Quaternion.identity; transform.localRotation = Quaternion.identity;
@@ -293,7 +293,7 @@ namespace NBF
var solver = Instantiate(lineSolverPrefab, GearRoot); var solver = Instantiate(lineSolverPrefab, GearRoot);
solver.transform.position = Asset.lineConnector.position; solver.transform.position = Asset.lineConnector.position;
solver.transform.rotation = Asset.lineConnector.rotation; solver.transform.rotation = Asset.lineConnector.rotation;
var indexNames = new[] { "fishing line float set", "fishing line spinning" }; var indexNames = new[] { "LineHand1", "LineHand1" };
var path = var path =
$"Assets/ResRaw/Prefabs/Line/{indexNames[currentLineTypeIndex]}.prefab"; $"Assets/ResRaw/Prefabs/Line/{indexNames[currentLineTypeIndex]}.prefab";
var prefab = Assets.Load<GameObject>(path); var prefab = Assets.Load<GameObject>(path);

View File

@@ -72,7 +72,7 @@ namespace NBF
private void UpdateTimeOfDay() private void UpdateTimeOfDay()
{ {
var p = GameTimer.GetGameDayProgress(); var p = GameTimer.GetGameDayProgress();
p = 0.3f; p = 0.1f;
// Debug.Log(p); // Debug.Log(p);
EnviroManager.instance.Time.SetTimeOfDay(p * 24f); EnviroManager.instance.Time.SetTimeOfDay(p * 24f);
// if(AzureCoreSystem) // if(AzureCoreSystem)

View File

@@ -77,6 +77,12 @@ namespace NBF
await UnUseItem(); await UnUseItem();
} }
var itemConfig = Game.Tables.TbItem.Get(configId);
var Rod = itemConfig.InstantiateAndComponent<FRod>(Map.Instance.GearsNode, Vector3.zero,
Quaternion.identity);
await Rod.Init(this, configId, bindItems);
HandItem = Rod;
// ModelAsset.PlayerAnimator.OnUseItem(itemView); // ModelAsset.PlayerAnimator.OnUseItem(itemView);
// if (currItem == null) // if (currItem == null)