Files
AppleHillsProduction/Assets/Scripts/Sound/GardenerVisibilityDetection.cs

22 lines
504 B
C#
Raw Normal View History

2025-10-20 16:21:32 +02:00
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?"));
}
}