35 lines
727 B
C#
35 lines
727 B
C#
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();
|
|
}
|
|
} |