- Added the missing Top Grunge portrait and intro theme. - Added In Jail and Video Music Clue sound effects.
100 lines
2.1 KiB
C#
100 lines
2.1 KiB
C#
|
|
using UdonSharp;
|
|
using UnityEngine;
|
|
using VRC.SDK3.Data;
|
|
using VRC.SDK3.UdonNetworkCalling;
|
|
using VRC.Udon.Common.Interfaces;
|
|
using VRC.SDKBase;
|
|
using System.Linq.Expressions;
|
|
|
|
|
|
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;
|
|
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)_ContinentData["Continent"].Number;
|
|
for (int i = 0; i < _Maps.Length; i++)
|
|
{
|
|
//_Maps[i].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 bool ConfirmChoice(string Country, string City)
|
|
{
|
|
if (Country == _Maps[(int)_ActiveMap].GetCurrentCountry() &&
|
|
City == _Maps[(int)_ActiveMap].GetCurrentCity())
|
|
{
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
|
|
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;
|
|
//}
|
|
}
|
|
}
|