36 lines
713 B
C#
36 lines
713 B
C#
|
|
using UdonSharp;
|
|
using UnityEngine;
|
|
using VRC.SDKBase;
|
|
|
|
|
|
[UdonBehaviourSyncMode(BehaviourSyncMode.None)]
|
|
public class LightningStrikeStation : UdonSharpBehaviour
|
|
{
|
|
[SerializeField] private CaseManager _CaseManager;
|
|
[Space]
|
|
[SerializeField] private VRCStation _Station;
|
|
|
|
|
|
public void EnterStation()
|
|
{
|
|
_Station.UseStation(Networking.LocalPlayer);
|
|
SendCustomEventDelayedSeconds(nameof(RemoveFromStation), 2.0f);
|
|
}
|
|
public void RemoveFromStation()
|
|
{
|
|
_Station.ExitStation(Networking.LocalPlayer);
|
|
}
|
|
|
|
|
|
public override void OnStationEntered(VRCPlayerApi Player)
|
|
{
|
|
base.OnStationEntered(Player);
|
|
}
|
|
|
|
public override void OnStationExited(VRCPlayerApi Player)
|
|
{
|
|
base.OnStationExited(Player);
|
|
}
|
|
}
|