TheStable/Assets/Scripts/SecretVulpine/SecretVulpineTrigger.cs
Jamie Greunbaum 57d9aa55ab - Added a special indoor post process volume to help with exposure changes.
- Secret Vulpine trigger is now network synced.
- Horseshoe is now network synced. Continuous for now, manual sync is planned.
2024-12-10 19:44:47 -05:00

38 lines
720 B
C#

using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
public class SecretVulpineTrigger : UdonSharpBehaviour
{
public GameObject Vulpine;
[UdonSynced, FieldChangeCallback(nameof(SetFoxActive))]
private bool FoxIsActive = false;
public override void Interact()
{
if (Vulpine != null)
{
Networking.SetOwner(Networking.LocalPlayer, gameObject);
SetProgramVariable("FoxIsActive", !FoxIsActive);
RequestSerialization();
}
}
public bool SetFoxActive
{
set
{
Vulpine.SetActive(!Vulpine.activeSelf);
FoxIsActive = value;
}
get => FoxIsActive;
}
}