首次提交
This commit is contained in:
36
Assets/Scripts/Fishing/Tackle/FGearBase.cs
Normal file
36
Assets/Scripts/Fishing/Tackle/FGearBase.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using Fantasy;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public abstract class FGearBase : MonoBehaviour
|
||||
{
|
||||
public FPlayer Player { get; protected set; }
|
||||
public FRod Rod { get; protected set; }
|
||||
public ItemInfo ItemInfo;
|
||||
|
||||
|
||||
public virtual void Init(FPlayer player, FRod rod)
|
||||
{
|
||||
Player = player;
|
||||
Rod = rod;
|
||||
OnInit();
|
||||
}
|
||||
|
||||
public void SetItemInfo(ItemInfo itemInfo)
|
||||
{
|
||||
ItemInfo = itemInfo;
|
||||
}
|
||||
|
||||
|
||||
protected void SetParent(Transform parent)
|
||||
{
|
||||
transform.SetParent(parent);
|
||||
transform.localPosition = Vector3.zero;
|
||||
transform.localEulerAngles = Vector3.zero;
|
||||
transform.localScale = Vector3.one;
|
||||
}
|
||||
|
||||
protected abstract void OnInit();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user