42 lines
659 B
C#
42 lines
659 B
C#
using UnityEngine;
|
|
|
|
public class Podbierak : MonoBehaviour
|
|
{
|
|
[HideInInspector]
|
|
public Animator animator;
|
|
|
|
public Transform fishPoint;
|
|
|
|
public Transform fish;
|
|
|
|
public bool isDone;
|
|
|
|
private void Start()
|
|
{
|
|
animator = GetComponent<Animator>();
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
MoveFishPositionOnFishPoint();
|
|
}
|
|
|
|
public void UnhookFish()
|
|
{
|
|
isDone = true;
|
|
}
|
|
|
|
public void HookToChwytak()
|
|
{
|
|
ScriptsHandler.Instance.m_PlayerMain.GetFishToChwytak();
|
|
}
|
|
|
|
private void MoveFishPositionOnFishPoint()
|
|
{
|
|
if (!(fish == null))
|
|
{
|
|
fish.transform.localPosition = Vector3.MoveTowards(fish.transform.localPosition, Vector3.zero, Time.deltaTime);
|
|
}
|
|
}
|
|
}
|