42 lines
762 B
C#
42 lines
762 B
C#
using UnityEngine;
|
|
|
|
public class FReelEvents : MonoBehaviour
|
|
{
|
|
private FReel reel;
|
|
|
|
private void Start()
|
|
{
|
|
reel = base.transform.parent.GetComponent<FReel>();
|
|
}
|
|
|
|
public void JoinHandKablak()
|
|
{
|
|
if (reel.animator.GetFloat("Reeling") > 0f)
|
|
{
|
|
reel.isBailOpen = false;
|
|
}
|
|
else
|
|
{
|
|
reel.currentRod.currentPlayer.InteractiveLeftHand(reel.BailHandle);
|
|
}
|
|
}
|
|
|
|
public void UnjoinHandKablak()
|
|
{
|
|
if (!reel.isHandOnHandle)
|
|
{
|
|
reel.currentRod.currentPlayer.InteractiveLeftHand(null);
|
|
if (reel.animator.GetBool("Unlock"))
|
|
{
|
|
reel.isBailOpen = true;
|
|
}
|
|
if (reel.animator.GetBool("Lock"))
|
|
{
|
|
reel.isBailOpen = false;
|
|
}
|
|
reel.animator.SetBool("Unlock", value: false);
|
|
reel.animator.SetBool("Lock", value: false);
|
|
}
|
|
}
|
|
}
|