Jamie Greunbaum 557ec5b239 - Floor markers now properly detect correct/incorrect placements.
- Implemented correct/incorrect sounds.
2025-06-22 04:44:30 -04:00

99 lines
2.0 KiB
C#

using UdonSharp;
using UnityEngine;
using VRC.SDK3.Data;
public enum ContinentMap
{
Africa,
Asia,
Europe,
NorthAmerica,
Oceania,
SouthAmerica
}
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
public class GameManagerRound3 : GameManagerBase
{
[SerializeField] private CaseManager _CaseManager;
[SerializeField] private FloorMap[] _Maps;
[SerializeField] private AudioManager _AudioManager;
private ContinentMap _ActiveMap = ContinentMap.Africa;
private DataDictionary _ContinentData;
private int _StageIndex = 0;
public override void InitialiseGameMode()
{
base.InitialiseGameMode();
}
public override void LoadQuestionData(DataToken Data)
{
_ContinentData = Data.DataDictionary;
if (_ContinentData.ContainsKey("Continent"))
{
_ActiveMap = (ContinentMap)(int)_ContinentData["Continent"].Number;
for (int i = 0; i < _Maps.Length; i++)
{
FloorMap Map = _Maps[(int)_ActiveMap];
if (Map != null)
{
Map.gameObject.SetActive(i == (int)_ActiveMap);
}
}
}
else
{
Debug.LogError("Malformed round data. Ensure Round 3 contains a continent to use for the map.");
}
EnableInteraction("Start Game");
}
private void DisplayBriefing()
{
HostCardRecoverTheLootExplainerInterface RecoverTheLootInterface =
(HostCardRecoverTheLootExplainerInterface)GetHostCardInterface(RoundSegmentType.RecoverTheLootExplainer);
RecoverTheLootInterface.HeaderUI.text = RoundSegmentTypeToString(RoundSegmentType.RecoverTheLootExplainer);
}
public string GetCurrentCountry()
{
return _Maps[(int)_ActiveMap].GetCurrentCountry();
}
public string GetCurrentCity()
{
return _Maps[(int)_ActiveMap].GetCurrentCity();
}
protected override HostCardInterfaceBase GetHostCardInterface(RoundSegmentType Question)
{
return _HostCard.EnableHostCardDisplay(RoundType.RecoverTheLoot, Question);
}
protected override void _HostCardUseButtonDown_Internal()
{
//_StageIndex++;
//switch (_StageIndex)
//{
// case 1: DisplayBriefing(); break;
// case 2: BeginRound(); break;
//}
}
}