52 lines
914 B
C#
52 lines
914 B
C#
using UltimateWater;
|
|
using UnityEngine;
|
|
|
|
public class FishInteractive : vp_Interactable
|
|
{
|
|
public GameObject Target;
|
|
|
|
public string TargetMessage = string.Empty;
|
|
|
|
public Fish fish;
|
|
|
|
[HideInInspector]
|
|
public MeshRenderer meshRenderer;
|
|
|
|
protected override void Start()
|
|
{
|
|
if (fish == null)
|
|
{
|
|
fish = base.gameObject.GetComponent<Fish>();
|
|
}
|
|
base.Start();
|
|
}
|
|
|
|
public override bool TryInteract(vp_PlayerEventHandler player)
|
|
{
|
|
if (m_Player == null)
|
|
{
|
|
m_Player = player;
|
|
}
|
|
FishingPlayer component = m_Player.GetComponent<FishingPlayer>();
|
|
fish.GetComponent<WaterFloat>().enabled = false;
|
|
component.fish = fish;
|
|
StartCoroutine(component.ShowCatchObject());
|
|
base.enabled = false;
|
|
return true;
|
|
}
|
|
|
|
public void ShowVisual(bool show)
|
|
{
|
|
if (!meshRenderer)
|
|
{
|
|
}
|
|
}
|
|
|
|
protected override void OnTriggerEnter(Collider col)
|
|
{
|
|
if (InteractType == vp_InteractType.Trigger)
|
|
{
|
|
}
|
|
}
|
|
}
|