修改
This commit is contained in:
33
Assets/Scripts/Fishing/New/Data/Item/PlayerItem.cs
Normal file
33
Assets/Scripts/Fishing/New/Data/Item/PlayerItem.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System.Collections.Generic;
|
||||
using Fantasy;
|
||||
using Fantasy.Entitas;
|
||||
using NBF.Utils;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
/// <summary>
|
||||
/// 玩家物品
|
||||
/// </summary>
|
||||
public abstract class PlayerItem : Entity
|
||||
{
|
||||
public Player Owner;
|
||||
|
||||
/// <summary>
|
||||
/// 配置id
|
||||
/// </summary>
|
||||
public int ConfigID;
|
||||
|
||||
|
||||
public virtual void Init(Player player, ItemInfo bindInfo)
|
||||
{
|
||||
Owner = player;
|
||||
ConfigID = bindInfo.ConfigId;
|
||||
// var itemType = bindInfo.Item.GetItemType();
|
||||
// if (itemType == ItemType.Rod)
|
||||
// {
|
||||
// var rod = AddComponent<PlayerItemRod>();
|
||||
// rod.Init(bindInfo);
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Fishing/New/Data/Item/PlayerItem.cs.meta
Normal file
3
Assets/Scripts/Fishing/New/Data/Item/PlayerItem.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6649b122db2f46aea8147228c674a38c
|
||||
timeCreated: 1773037313
|
||||
15
Assets/Scripts/Fishing/New/Data/Item/PlayerItemRod.cs
Normal file
15
Assets/Scripts/Fishing/New/Data/Item/PlayerItemRod.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System.Collections.Generic;
|
||||
using Fantasy;
|
||||
using Fantasy.Entitas;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public class PlayerItemRod : PlayerItem
|
||||
{
|
||||
public override void Init(Player player, ItemInfo bindInfo)
|
||||
{
|
||||
//var binds = RoleModel.Instance.GetBindItems(item.Id);
|
||||
base.Init(player, bindInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9e0846296bef4505868010bfe1eee1e3
|
||||
timeCreated: 1773124278
|
||||
Reference in New Issue
Block a user