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

View File

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

View File

@@ -1,4 +1,5 @@
using System.Collections.Generic;
using Fantasy.Async;
using UnityEngine;
namespace NBF
@@ -15,12 +16,18 @@ namespace NBF
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;
ConfigID = configId;
BindItems.Clear();
BindItems.AddRange(bindItems);
await OnInit();
}
protected virtual async FTask OnInit()
{
await FTask.CompletedTask;
}
}
}

View File

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

View File

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

View File

@@ -77,6 +77,12 @@ namespace NBF
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);
// if (currItem == null)