using UnityEngine; public class FullBodyAvatarAnimEvents : MonoBehaviour { private FPlayer player; private FPlayer Player { get { if (!player) { player = GetComponentInParent(); } return player; } } private FullBodyAvatar FBA { get { if (!Player) { return null; } return Player.FullBodyAvatar; } } public void DestroyRod() { if ((bool)Player && (bool)Player.currentRod) { Object.Destroy(Player.currentRod.gameObject); Player.currentRod = null; } } public void BlockLineByFinger() { if ((bool)Player && (bool)Player.currentRod && Player.fishingMode != FPlayer.FishingMode.Manual) { Player.currentRod.currentReel.isBlockLineByFinger = true; Player.currentRod.currentPlayer.InteractiveLeftHand(Player.currentRod.currentReel.BailHandle); } } public void UnlockReel() { if ((bool)Player) { Player.currentRod.currentReel.LockUnlockKablag(); FBA.ReelLockUnlockReset(); } } public void UnlockReelWithHandAnimation() { if ((bool)Player) { Player.UnlockLockReel(); } } public void PutHandOnReel() { if ((bool)Player && Player.currentRod.fishingLine.currentLineHandler.PhisicsLineOut > 0f && !Player.currentRod.currentReel.isHandOnHandle) { Player.InteractiveLeftHand(Player.currentRod.currentReel.handle); } } public void UnBlockLineByFinger() { if ((bool)Player && Player.fishingMode != FPlayer.FishingMode.Manual && (bool)Player.currentRod) { if (Player.currentRod.throwForcePower > 0f) { Player.currentRod.ForceThrow(); } Player.currentRod.currentReel.isBlockLineByFinger = false; } } public void UnBlockLineByFingerNear() { if ((bool)Player && Player.fishingMode != FPlayer.FishingMode.Manual && (bool)Player.currentRod) { if (Player.currentRod.throwForcePower > 0f) { Player.currentRod.ForceThrow(isNear: true); } Player.currentRod.currentReel.isBlockLineByFinger = false; Player.OutLineFromLeftHandHelper(Player.currentRod.fishingLine.currentLineHandler.LineConnector_1.transform); } } public void ResetThrow() { if ((bool)Player) { FBA.ThrowReset(); } } public void CatchFish() { if ((bool)Player) { Player.currentRod.CastFish(); } } public void ShowFishPanel() { if ((bool)Player) { FScriptsHandler.Instance.m_HudManager.ShowHideFishCatchPanel(); } } public void DestroyCurrentFish() { if ((bool)Player) { Player.currentRod.DestroyCurrentFish(); } } }