大修改调整
This commit is contained in:
35
Assets/Scripts/Fishing/New/View/Tackle/FGearBase.cs
Normal file
35
Assets/Scripts/Fishing/New/View/Tackle/FGearBase.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using Fantasy;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public abstract class FGearBase : MonoBehaviour
|
||||
{
|
||||
public FRod Rod { get; protected set; }
|
||||
|
||||
public int ConfigId;
|
||||
|
||||
|
||||
public virtual void Init(FRod rod)
|
||||
{
|
||||
Rod = rod;
|
||||
OnInit();
|
||||
}
|
||||
|
||||
public void SetItemConfigId(int id)
|
||||
{
|
||||
ConfigId = id;
|
||||
}
|
||||
|
||||
|
||||
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