- Added a door and steps to round 1 area. - Added an entrance teleport button to the spawn area. - Host teleport buttons disabled if the player doesn't have host permissions. - Reflection probes tweaked a bit.
35 lines
546 B
C#
35 lines
546 B
C#
|
|
using UdonSharp;
|
|
using UnityEngine;
|
|
using VRC.SDKBase;
|
|
using VRC.Udon;
|
|
|
|
|
|
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
|
|
public class Door : UdonSharpBehaviour
|
|
{
|
|
[UdonSynced, FieldChangeCallback(nameof(OpenDoor))] private bool _OpenDoor = false;
|
|
|
|
[SerializeField] private Animator _OpenAnimation;
|
|
|
|
|
|
public override void Interact()
|
|
{
|
|
OpenDoor = !OpenDoor;
|
|
RequestSerialization();
|
|
|
|
base.Interact();
|
|
}
|
|
|
|
|
|
public bool OpenDoor
|
|
{
|
|
set
|
|
{
|
|
_OpenDoor = value;
|
|
_OpenAnimation.SetBool("Open", value);
|
|
}
|
|
get => _OpenDoor;
|
|
}
|
|
}
|