CarmenSandiego/Assets/UdonSharp/DetectiveNoirEffect.cs
Jamie Greunbaum 3c5d94425d - Fully implemented Detective Noir presentation.
- Video loading at the start of a round should be more reliable now.
2025-11-26 22:19:47 -05:00

27 lines
516 B
C#

using UdonSharp;
using UnityEngine;
public class DetectiveNoirEffect : UdonSharpBehaviour
{
[SerializeField] private AudioManager _AudioManager;
[SerializeField] private Animator _Animator;
[UdonSynced, FieldChangeCallback(nameof(Activate))] private bool _Activate = false;
public bool Activate
{
set
{
_Activate = value;
_Animator.SetBool("Activate", _Activate);
if (!_Activate) _AudioManager.PlaySFX(SFXEventType.LightSwitch);
RequestSerialization();
}
get => _Activate;
}
}