CarmenSandiego/Assets/UdonSharp/Host Card Interfaces/HostCardRecoverTheLootInterface.cs
Jamie Greunbaum acdf54f8f5 Recover The Loot is now completely functional as a game mode, and can be
controlled entirely with the host card.
2025-06-16 21:36:50 -04:00

48 lines
1.1 KiB
C#

using TMPro;
using UnityEngine.UI;
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
public class HostCardRecoverTheLootInterface : HostCardInterfaceBase
{
[SerializeField] private TextMeshProUGUI _CommentUI;
private Color[] _ButtonColours;
private Color _ButtonColourEnabled = Color.white;
private Color _ButtonColourDisabled = Color.gray;
private Color _ButtonColourAlreadyChosen = Color.yellow;
public void SetComment(string Comment, Color CommentColour)
{
_CommentUI.text = Comment;
_CommentUI.color = CommentColour;
}
public void AddLandmarkName(int ButtonIndex, string LandmarkName)
{
ChoiceUI[ButtonIndex].text = LandmarkName;
}
public void DisablePanelButton(int Panel)
{
ChoiceButtons[Panel - 1].enabled = false;
ChoiceButtonImages[Panel - 1].color = _ButtonColourDisabled;
}
public void EnableAllPanelButtons(bool Enable)
{
for (int i = 0; i < ChoiceButtons.Length; i++)
{
ChoiceButtons[i].enabled = Enable;
ChoiceButtonImages[i].color = Enable ? _ButtonColourEnabled : _ButtonColourDisabled;
}
}
}