22 lines
504 B
C#
22 lines
504 B
C#
using TMPro;
|
|
using UnityEngine;
|
|
|
|
|
|
public class GardenerVisibilityDetection : MonoBehaviour
|
|
{
|
|
public GardenerAudioController gardenerAudioController;
|
|
private Animator _animator;
|
|
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
|
void Start()
|
|
{
|
|
_animator = GetComponent<Animator>();
|
|
}
|
|
|
|
private void OnBecameVisible()
|
|
{
|
|
gardenerAudioController.PlayGardenerVOClip(_animator.GetBool("IsScared?"));
|
|
|
|
}
|
|
|
|
}
|