- Lightning Round SFX no longer play in nested NetworkEventTarget.All function.
39 lines
652 B
C#
39 lines
652 B
C#
|
|
using UdonSharp;
|
|
using UnityEngine;
|
|
using VRC.SDKBase;
|
|
using VRC.Udon;
|
|
|
|
|
|
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
|
|
public class TheChasePlayer : UdonSharpBehaviour
|
|
{
|
|
[SerializeField] private Animator _TheChaseAnimator;
|
|
|
|
[UdonSynced, FieldChangeCallback(nameof(PlayAnimation))] private bool _PlayAnimation = false;
|
|
|
|
|
|
public void Play()
|
|
{
|
|
PlayAnimation = true;
|
|
RequestSerialization();
|
|
}
|
|
|
|
public void Stop()
|
|
{
|
|
PlayAnimation = false;
|
|
RequestSerialization();
|
|
}
|
|
|
|
|
|
private bool PlayAnimation
|
|
{
|
|
set
|
|
{
|
|
_PlayAnimation = value;
|
|
_TheChaseAnimator.SetBool("Play The Chase", _PlayAnimation);
|
|
}
|
|
get => _PlayAnimation;
|
|
}
|
|
}
|