55 lines
1.4 KiB
C#
55 lines
1.4 KiB
C#
using UnityEngine;
|
|
|
|
namespace NBF
|
|
{
|
|
public class ReelAnimator : MonoBehaviour
|
|
{
|
|
public FReel Reel;
|
|
|
|
private Animator _animator;
|
|
|
|
#region 参数定义
|
|
|
|
private static readonly int ReelingHash = Animator.StringToHash("Reeling");
|
|
private static readonly int LineOutHash = Animator.StringToHash("LineOut");
|
|
private static readonly int UnlockHash = Animator.StringToHash("Unlock");
|
|
private static readonly int LineOutUnlockHash = Animator.StringToHash("LineOutUnlock");
|
|
|
|
public float Reeling
|
|
{
|
|
get => _animator.GetFloat(ReelingHash);
|
|
set => _animator.SetFloat(ReelingHash, value);
|
|
}
|
|
|
|
public float Reeling2
|
|
{
|
|
get => _animator.GetFloat(ReelingHash);
|
|
set => _animator.SetFloat(ReelingHash, value);
|
|
}
|
|
|
|
public float LineOut
|
|
{
|
|
get => _animator.GetFloat(LineOutHash);
|
|
set => _animator.SetFloat(LineOutHash, value);
|
|
}
|
|
|
|
public bool Unlock
|
|
{
|
|
get => _animator.GetBool(UnlockHash);
|
|
set => _animator.SetBool(UnlockHash, value);
|
|
}
|
|
|
|
public bool LineOutUnlock
|
|
{
|
|
get => _animator.GetBool(LineOutUnlockHash);
|
|
set => _animator.SetBool(LineOutUnlockHash, value);
|
|
}
|
|
|
|
#endregion
|
|
|
|
private void Awake()
|
|
{
|
|
_animator = GetComponent<Animator>();
|
|
}
|
|
}
|
|
} |