完成基本代码迁移重构
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
using Fantasy.Async;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public class PlayerItemRodView : PlayerItemView
|
||||
{
|
||||
public RodAsset RodAsset;
|
||||
|
||||
public override async FTask InitShow(PlayerItem item)
|
||||
{
|
||||
Item = item;
|
||||
var itemConfig = Game.Tables.TbItem.Get(Item.ConfigID);
|
||||
RodAsset = itemConfig.InstantiateAndComponent<RodAsset>(SceneSettings.Instance.GearNode, Vector3.zero,
|
||||
Quaternion.identity);
|
||||
|
||||
// await Rod.InitRod(Item);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 77390e0ed53847f3b190ffc0d9f1319a
|
||||
timeCreated: 1773124629
|
||||
@@ -7,21 +7,22 @@ namespace NBF
|
||||
/// <summary>
|
||||
/// 玩家物品视图组件
|
||||
/// </summary>
|
||||
public abstract class PlayerItemView : Entity
|
||||
public class PlayerItemView : Entity
|
||||
{
|
||||
public PlayerItem Item { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// 竿子
|
||||
/// </summary>
|
||||
public FRod Rod { get; private set; }
|
||||
|
||||
public abstract FTask InitShow(PlayerItem item);
|
||||
|
||||
// public async FTask InitShow()
|
||||
// {
|
||||
// // Item = GetParent<PlayerItem>();
|
||||
// var itemConfig = Game.Tables.TbItem.Get(Item.ConfigID);
|
||||
// // Rod = itemConfig.InstantiateAndComponent<FRod>(SceneSettings.Instance.GearNode, Vector3.zero,
|
||||
// // Quaternion.identity);
|
||||
//
|
||||
// // await Rod.InitRod(Item);
|
||||
// }
|
||||
public async FTask InitShow(PlayerItem item)
|
||||
{
|
||||
Item = item;
|
||||
var itemConfig = Game.Tables.TbItem.Get(Item.ConfigID);
|
||||
Rod = itemConfig.InstantiateAndComponent<FRod>(SceneSettings.Instance.GearNode, Vector3.zero,
|
||||
Quaternion.identity);
|
||||
await Rod.InitRod(Item);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user