This commit is contained in:
2026-01-01 23:57:29 +08:00
parent 04dd4a23b2
commit bfdfcfe2cd
13 changed files with 407 additions and 180 deletions

View File

@@ -26,7 +26,7 @@ namespace NBF
public FPlayerData Data { get; private set; }
public readonly List<FRod> Tackles = new List<FRod>();
public FRod HandTackle { get; private set; }
public FRod Rod { get; private set; }
protected override void OnAwake()
{
@@ -73,17 +73,17 @@ namespace NBF
if (itemType == ItemType.Rod)
{
//判断旧的是否要收回
if (HandTackle != null)
if (Rod != null)
{
yield return HandTackle.Destroy();
Tackles.Remove(HandTackle);
HandTackle = null;
yield return Rod.Destroy();
Tackles.Remove(Rod);
Rod = null;
}
HandTackle =
Rod =
item.Config.InstantiateAndComponent<FRod>(SceneSettings.Instance.GearNode, Vector3.zero, Quaternion.identity);
yield return HandTackle.InitRod(this, item);
Tackles.Add(HandTackle);
yield return Rod.InitRod(this, item);
Tackles.Add(Rod);
}
}