33 lines
722 B
C#
33 lines
722 B
C#
using System.Collections.Generic;
|
|
using Fantasy.Async;
|
|
using UnityEngine;
|
|
|
|
namespace NBF
|
|
{
|
|
public abstract class PlayerItem : MonoBehaviour
|
|
{
|
|
/// <summary>
|
|
/// 配置id
|
|
/// </summary>
|
|
public int ConfigID;
|
|
|
|
public List<int> BindItems = new List<int>();
|
|
|
|
public Player Owner;
|
|
|
|
|
|
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;
|
|
}
|
|
}
|
|
} |