- The Chase and the final round now load their respective maps correctly.
- "Correct" and "Incorrect" buttons in Round 3 work again.
This commit is contained in:
@@ -6,6 +6,7 @@ using VRC.SDK3.UdonNetworkCalling;
|
||||
using VRC.Udon.Common.Interfaces;
|
||||
using VRC.SDKBase;
|
||||
using VRC.SDK3.StringLoading;
|
||||
using VRC.SDKBase.Midi;
|
||||
|
||||
|
||||
public enum PresentationMedium
|
||||
@@ -114,6 +115,11 @@ public class GameManagerRound1 : GameManagerBase
|
||||
_CurrentQuestionType = (RoundSegmentType)(int)_CurrentQuestion["Type"].Number;
|
||||
_QuestionStage = 0;
|
||||
|
||||
LoadMapsIntoQueue();
|
||||
}
|
||||
|
||||
private void LoadMapsIntoQueue()
|
||||
{
|
||||
if (_CurrentQuestion.ContainsKey("Maps") && _CurrentQuestion["Maps"].TokenType == TokenType.DataList)
|
||||
{
|
||||
DataList Maps = _CurrentQuestion["Maps"].DataList;
|
||||
@@ -541,6 +547,8 @@ public class GameManagerRound1 : GameManagerBase
|
||||
Interface.ChoiceButtons[i].interactable = true;
|
||||
}
|
||||
|
||||
_VideoPlayer.SubMapIndex = (Clue - 1) * 2;
|
||||
|
||||
EnableBuzzInPeriodForAllPlayers();
|
||||
}
|
||||
|
||||
@@ -573,6 +581,9 @@ public class GameManagerRound1 : GameManagerBase
|
||||
}
|
||||
public void TheChaseEndClue()
|
||||
{
|
||||
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_AudioManager, NetworkEventTarget.All,
|
||||
"PlaySFXAtPitch", SFXEventType.Ding, AudioManager.D6);
|
||||
|
||||
HostCardTheChaseInterface Interface =
|
||||
(HostCardTheChaseInterface)GetHostCardInterface(RoundSegmentType.TheChase);
|
||||
|
||||
@@ -584,6 +595,8 @@ public class GameManagerRound1 : GameManagerBase
|
||||
|
||||
EndBuzzInPeriod();
|
||||
|
||||
_VideoPlayer.SubMapIndex++;
|
||||
|
||||
EnableInteraction("Next Question");
|
||||
}
|
||||
|
||||
@@ -595,16 +608,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
|
||||
Interface.HeaderUI.text = "Introduce the round here.";
|
||||
|
||||
// Preload the maps for this section.
|
||||
if (_CurrentQuestion.ContainsKey("Maps") && _CurrentQuestion["Maps"].TokenType == TokenType.DataList)
|
||||
{
|
||||
DataList Maps = _CurrentQuestion["Maps"].DataList;
|
||||
for (int i = 0; i < Maps.Count; i++)
|
||||
{
|
||||
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_VideoPlayer, NetworkEventTarget.All,
|
||||
"LoadMap", (int)Maps[i].Number);
|
||||
}
|
||||
}
|
||||
LoadMapsIntoQueue();
|
||||
|
||||
EnableInteraction("Show Map Preview");
|
||||
}
|
||||
@@ -926,7 +930,6 @@ public class GameManagerRound1 : GameManagerBase
|
||||
private void PrepareNextQuestion()
|
||||
{
|
||||
InitialiseQuestion();
|
||||
|
||||
ShowBetweenQuestionsInterface();
|
||||
|
||||
EnableInteraction("Show Next Question");
|
||||
|
||||
@@ -177,8 +177,7 @@ public class GameManagerRound3 : GameManagerBase
|
||||
[NetworkCallable]
|
||||
public void CorrectResponse()
|
||||
{
|
||||
_AudioManager.SendCustomNetworkEvent(NetworkEventTarget.All,
|
||||
"PlaySFX", SFXEventType.MapCorrect);
|
||||
PlayCorrectSound();
|
||||
|
||||
SuccessCounter++;
|
||||
if (SuccessCounter >= MAX_SUCCESS_COUNT)
|
||||
@@ -196,8 +195,7 @@ public class GameManagerRound3 : GameManagerBase
|
||||
[NetworkCallable]
|
||||
public void IncorrectResponse()
|
||||
{
|
||||
_AudioManager.SendCustomNetworkEvent(NetworkEventTarget.All,
|
||||
"PlaySFX", SFXEventType.MapIncorrect);
|
||||
PlayIncorrectSound();
|
||||
|
||||
FailureCounter++;
|
||||
if (FailureCounter >= MAX_FAILURE_COUNT)
|
||||
@@ -343,6 +341,19 @@ public class GameManagerRound3 : GameManagerBase
|
||||
}
|
||||
|
||||
|
||||
public void PlayCorrectSound()
|
||||
{
|
||||
_AudioManager.SendCustomNetworkEvent(NetworkEventTarget.All,
|
||||
"PlaySFX", SFXEventType.MapCorrect);
|
||||
}
|
||||
|
||||
public void PlayIncorrectSound()
|
||||
{
|
||||
_AudioManager.SendCustomNetworkEvent(NetworkEventTarget.All,
|
||||
"PlaySFX", SFXEventType.MapIncorrect);
|
||||
}
|
||||
|
||||
|
||||
private void GameStatusUpdate(GameStatus NewStatus)
|
||||
{
|
||||
if ((int)_GameStatus <= (int)GameStatus.Begin)
|
||||
|
||||
Reference in New Issue
Block a user