Jamie Greunbaum 359ef58a33 - Fixed a bug that caused the crook portrait to never update except on owner.
- Reduced polygon count of drywall meshes.
- Improved triangulation of the TV screen.
- Improved lightmaps, and reduce their size.
- Added video player to show Patty Larceny going to jail.
- Added temporary Patty In Jail tune.
- Added a new interface to the host card for these experimental features.
2025-08-23 04:52:48 -04:00

124 lines
3.1 KiB
C#

using UdonSharp;
using UnityEngine;
using VRC.SDK3.Data;
using VRC.SDKBase;
using VRC.Udon.Common.Interfaces;
public enum RoundType
{
None,
LocateTheCrook,
RecoverTheLoot,
CaptureCarmen
}
public enum RoundSegmentType
{
BetweenSegments,
MultipleChoice,
LightningRound,
DumpsterDive,
TheChase,
FinalRound,
Tiebreaker,
EndGame,
RecoverTheLootExplainer,
RecoverTheLoot,
EndRecoverTheLoot,
CaptureCarmenExplainer,
CaptureCarmen
}
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
public class GameManagerBase : UdonSharpBehaviour
{
[SerializeField] protected HostCardManager _HostCard = null;
[SerializeField] protected CaseManager _CaseManager;
[SerializeField] protected AudioManager _AudioManager;
private bool _AllowInteractionFromHostCard = false;
protected void EnableInteraction(string NextInteraction = "Advance")
{
_AllowInteractionFromHostCard = true;
_HostCard.SetNextInteractionText(NextInteraction);
}
protected void DisableInteraction()
{
_AllowInteractionFromHostCard = false;
_HostCard.SetNextInteractionText("");
}
public bool IsInteractionEnabled()
{
return _AllowInteractionFromHostCard;
}
public void HostCardUseButtonDown()
{
if (!IsInteractionEnabled()) { return; }
_HostCardUseButtonDown_Internal();
}
protected virtual HostCardInterfaceBase GetHostCardInterface(RoundSegmentType Question)
{
Debug.LogError("You should not be seeing this. You don't need to call base.GetHostCardInterface()");
return _HostCard.EnableHostCardDisplay(RoundType.None, Question);
}
protected virtual void _HostCardUseButtonDown_Internal()
{
Debug.LogError("You should not be seeing this. You don't need to call base._HostCardUseButtonDown_Internal()");
}
public virtual void InitialiseGameMode() { }
public virtual void SetOwnershipOfObjects(VRCPlayerApi NewOwner) { }
public virtual void LoadQuestionData(DataToken Data) { }
protected string RoundTypeToString(RoundType Type)
{
switch ((int)Type)
{
case (int)RoundType.LocateTheCrook: return "Locate The Crook";
case (int)RoundType.RecoverTheLoot: return "Recover The Loot";
case (int)RoundType.CaptureCarmen: return "Capture Carmen";
default: return "[[ERROR]]";
}
}
protected string RoundSegmentTypeToString(RoundSegmentType Type)
{
switch (Type)
{
case RoundSegmentType.BetweenSegments: return "None";
case RoundSegmentType.MultipleChoice: return "Standard Round";
case RoundSegmentType.LightningRound: return "Lightning Round";
case RoundSegmentType.DumpsterDive: return "Dumpster Dive";
case RoundSegmentType.TheChase: return "The Chase";
case RoundSegmentType.FinalRound: return "Final Round";
case RoundSegmentType.Tiebreaker: return "Tiebreaker";
case RoundSegmentType.RecoverTheLootExplainer: return "Recover The Loot - Briefing";
case RoundSegmentType.RecoverTheLoot: return "Recover The Loot";
case RoundSegmentType.EndRecoverTheLoot: return "Recover The Loot - Debriefing";
case RoundSegmentType.CaptureCarmenExplainer: return "Capture Carmen - Briefing";
case RoundSegmentType.CaptureCarmen: return "Capture Carmen";
default: return "[[ERROR]]";
}
}
}