53 lines
1.0 KiB
C#
53 lines
1.0 KiB
C#
using NBF;
|
|
using UnityEngine;
|
|
using UnityEngine.Serialization;
|
|
|
|
public class FReel : FPlayerGear
|
|
{
|
|
public bool isBlockLineByFinger { get; set; }
|
|
|
|
/// <summary>
|
|
/// 手是否放在手柄上
|
|
/// </summary>
|
|
[HideInInspector]
|
|
public bool isHandOnHandle { get; set; }
|
|
|
|
|
|
[SerializeField] public float reelingDrag = 1f;
|
|
|
|
|
|
public ReelAsset reelAsset;
|
|
|
|
public ReelAnimator AnimatorCtrl;
|
|
|
|
|
|
private void Awake()
|
|
{
|
|
reelAsset = GetComponent<ReelAsset>();
|
|
AnimatorCtrl = reelAsset.animator.gameObject.GetComponent<ReelAnimator>();
|
|
if (AnimatorCtrl == null)
|
|
{
|
|
AnimatorCtrl = reelAsset.animator.gameObject.AddComponent<ReelAnimator>();
|
|
}
|
|
}
|
|
|
|
protected override void OnStart()
|
|
{
|
|
}
|
|
|
|
protected override void OnUpdate()
|
|
{
|
|
}
|
|
|
|
public void Unlock(bool unlock = true)
|
|
{
|
|
if (unlock)
|
|
{
|
|
AnimatorCtrl.Unlock = true;
|
|
}
|
|
else
|
|
{
|
|
AnimatorCtrl.Unlock = false;
|
|
}
|
|
}
|
|
} |