- Video player has been made a central object to improve reliability. - Location board buttons on host card now indicate where items are. - Jail Chain now syncs properly once again.
73 lines
1.9 KiB
C#
73 lines
1.9 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;
|
|
[Space]
|
|
public Color _ButtonColourEnabled = Color.white;
|
|
public Color _ButtonColourDisabled = Color.gray;
|
|
[Space]
|
|
public Color _ButtonColourLoot = new Color(0.0f, 1.0f, 1.0f);
|
|
public Color _ButtonColourWarrant = new Color(1.0f, 1.0f, 0.0f);
|
|
public Color _ButtonColourCrook = new Color(0.0f, 1.0f, 0.0f);
|
|
|
|
private int _LootButton = -1;
|
|
private int _WarrantButton = -1;
|
|
private int _CrookButton = -1;
|
|
|
|
|
|
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;
|
|
}
|
|
|
|
if (_LootButton >= 0) ChoiceButtonImages[_LootButton].color = _ButtonColourLoot;
|
|
if (_WarrantButton >= 0) ChoiceButtonImages[_WarrantButton].color = _ButtonColourWarrant;
|
|
if (_CrookButton >= 0) ChoiceButtonImages[_CrookButton].color = _ButtonColourCrook;
|
|
}
|
|
|
|
|
|
public void SetLootButton(int Index)
|
|
{
|
|
_LootButton = (Index - 1) % ChoiceButtons.Length;
|
|
}
|
|
|
|
public void SetWarrantButton(int Index)
|
|
{
|
|
_WarrantButton = (Index - 1) % ChoiceButtons.Length;
|
|
}
|
|
|
|
public void SetCrookButton(int Index)
|
|
{
|
|
_CrookButton = (Index - 1) % ChoiceButtons.Length;
|
|
}
|
|
}
|