- Improved the host card interface, and added more info between questions. - Started preliminary work on a permissions system.
151 lines
3.2 KiB
C#
151 lines
3.2 KiB
C#
|
|
using UdonSharp;
|
|
using UnityEngine;
|
|
using VRC.SDK3.UdonNetworkCalling;
|
|
using VRC.SDKBase;
|
|
using VRC.Udon;
|
|
using VRC.Udon.Common.Interfaces;
|
|
|
|
|
|
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
|
|
public class AdminPanelInterface : UdonSharpBehaviour
|
|
{
|
|
[SerializeField] private GameObject _PlayersPanel;
|
|
[SerializeField] private GameObject _CamerasPanel;
|
|
|
|
[SerializeField] private PlayerPodium[] _PlayerPodiums;
|
|
|
|
|
|
public void ShowPlayersAdminView()
|
|
{
|
|
_PlayersPanel.SetActive(true);
|
|
_CamerasPanel.SetActive(false);
|
|
}
|
|
|
|
public void ShowCamerasAdminView()
|
|
{
|
|
_PlayersPanel.SetActive(false);
|
|
_CamerasPanel.SetActive(true);
|
|
}
|
|
|
|
|
|
public void Player1_ResetPodiumOwner()
|
|
{
|
|
NetworkCalling.SendCustomNetworkEvent(
|
|
(IUdonEventReceiver)_PlayerPodiums[0],
|
|
NetworkEventTarget.All,
|
|
"ResetOwner");
|
|
}
|
|
public void Player2_ResetPodiumOwner()
|
|
{
|
|
NetworkCalling.SendCustomNetworkEvent(
|
|
(IUdonEventReceiver)_PlayerPodiums[1],
|
|
NetworkEventTarget.All,
|
|
"ResetOwner");
|
|
}
|
|
public void Player3_ResetPodiumOwner()
|
|
{
|
|
NetworkCalling.SendCustomNetworkEvent(
|
|
(IUdonEventReceiver)_PlayerPodiums[2],
|
|
NetworkEventTarget.All,
|
|
"ResetOwner");
|
|
}
|
|
|
|
public void Player1_DecreaseScoreBy5()
|
|
{
|
|
NetworkCalling.SendCustomNetworkEvent(
|
|
(IUdonEventReceiver)_PlayerPodiums[0],
|
|
NetworkEventTarget.All,
|
|
"DecreaseScoreBy5");
|
|
}
|
|
public void Player2_DecreaseScoreBy5()
|
|
{
|
|
NetworkCalling.SendCustomNetworkEvent(
|
|
(IUdonEventReceiver)_PlayerPodiums[1],
|
|
NetworkEventTarget.All,
|
|
"DecreaseScoreBy5");
|
|
}
|
|
public void Player3_DecreaseScoreBy5()
|
|
{
|
|
NetworkCalling.SendCustomNetworkEvent(
|
|
(IUdonEventReceiver)_PlayerPodiums[2],
|
|
NetworkEventTarget.All,
|
|
"DecreaseScoreBy5");
|
|
}
|
|
|
|
public void Player1_IncreaseScoreBy5()
|
|
{
|
|
NetworkCalling.SendCustomNetworkEvent(
|
|
(IUdonEventReceiver)_PlayerPodiums[0],
|
|
NetworkEventTarget.All,
|
|
"IncreaseScoreBy5");
|
|
}
|
|
public void Player2_IncreaseScoreBy5()
|
|
{
|
|
NetworkCalling.SendCustomNetworkEvent(
|
|
(IUdonEventReceiver)_PlayerPodiums[1],
|
|
NetworkEventTarget.All,
|
|
"IncreaseScoreBy5");
|
|
}
|
|
public void Player3_IncreaseScoreBy5()
|
|
{
|
|
NetworkCalling.SendCustomNetworkEvent(
|
|
(IUdonEventReceiver)_PlayerPodiums[2],
|
|
NetworkEventTarget.All,
|
|
"IncreaseScoreBy5");
|
|
}
|
|
|
|
public void Player1_ResetPodium()
|
|
{
|
|
NetworkCalling.SendCustomNetworkEvent(
|
|
(IUdonEventReceiver)_PlayerPodiums[0],
|
|
NetworkEventTarget.All,
|
|
"ResetPodium");
|
|
}
|
|
public void Player2_ResetPodium()
|
|
{
|
|
NetworkCalling.SendCustomNetworkEvent(
|
|
(IUdonEventReceiver)_PlayerPodiums[1],
|
|
NetworkEventTarget.All,
|
|
"ResetPodium");
|
|
}
|
|
public void Player3_ResetPodium()
|
|
{
|
|
NetworkCalling.SendCustomNetworkEvent(
|
|
(IUdonEventReceiver)_PlayerPodiums[2],
|
|
NetworkEventTarget.All,
|
|
"ResetPodium");
|
|
}
|
|
|
|
|
|
public void Camera1_Switch()
|
|
{
|
|
Debug.Log("Camera 1 should go live here.");
|
|
}
|
|
|
|
public void Camera2_Switch()
|
|
{
|
|
Debug.Log("Camera 2 should go live here.");
|
|
}
|
|
|
|
public void Camera3_Switch()
|
|
{
|
|
Debug.Log("Camera 3 should go live here.");
|
|
}
|
|
|
|
public void Camera4_Switch()
|
|
{
|
|
Debug.Log("Camera 4 should go live here.");
|
|
}
|
|
|
|
public void Camera5_Switch()
|
|
{
|
|
Debug.Log("Camera 5 should go live here.");
|
|
}
|
|
|
|
public void Camera6_Switch()
|
|
{
|
|
Debug.Log("Camera 6 should go live here.");
|
|
}
|
|
}
|