- Added Crook intro themes, and integrated them into Round 2.
- Reorganised materials into more texture-oriented categories.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using UdonSharp;
|
||||
using UnityEngine;
|
||||
using VRC.SDK3.Data;
|
||||
@@ -9,6 +10,22 @@ using VRC.Udon;
|
||||
using VRC.Udon.Common.Interfaces;
|
||||
|
||||
|
||||
public enum AccusedCrook
|
||||
{
|
||||
Contessa,
|
||||
DoubleTrouble,
|
||||
EarthaBrute,
|
||||
Kneemoi,
|
||||
PattyLarceny,
|
||||
Robocrook,
|
||||
SarahNade,
|
||||
VicTheSlick,
|
||||
WonderRat,
|
||||
|
||||
INDEX_MAX
|
||||
}
|
||||
|
||||
|
||||
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
|
||||
public class CaseManager : UdonSharpBehaviour
|
||||
{
|
||||
@@ -72,7 +89,7 @@ public class CaseManager : UdonSharpBehaviour
|
||||
// ErrorString = "Ensure the 'Round 3' dictionary entry is whatever it's meant to be once it's done being decided.";
|
||||
//}
|
||||
|
||||
ContinueToRound1();
|
||||
ContinueToRound2();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -114,4 +131,42 @@ public class CaseManager : UdonSharpBehaviour
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
public string GetCaseTitle()
|
||||
{
|
||||
return _CaseFile["Case Title"].ToString();
|
||||
}
|
||||
public string GetLoot()
|
||||
{
|
||||
return _CaseFile["Stolen Loot"].ToString();
|
||||
}
|
||||
public AccusedCrook GetCrook()
|
||||
{
|
||||
return (AccusedCrook)_CaseFile["Accused Crook"].Number;
|
||||
}
|
||||
|
||||
|
||||
public string CrookToString(AccusedCrook Crook)
|
||||
{
|
||||
switch (Crook)
|
||||
{
|
||||
case AccusedCrook.Contessa: return "Contessa";
|
||||
case AccusedCrook.DoubleTrouble: return "Double Trouble";
|
||||
case AccusedCrook.EarthaBrute: return "Eartha Brute";
|
||||
case AccusedCrook.Kneemoi: return "Kneemoi";
|
||||
case AccusedCrook.PattyLarceny: return "Patty Larceny";
|
||||
case AccusedCrook.Robocrook: return "Robocrook";
|
||||
case AccusedCrook.SarahNade: return "Sarah Nade";
|
||||
case AccusedCrook.VicTheSlick: return "Vic The Slick";
|
||||
case AccusedCrook.WonderRat: return "Wonder Rat";
|
||||
}
|
||||
|
||||
return "[[ERROR]]";
|
||||
}
|
||||
|
||||
public string GetAccusedCrook()
|
||||
{
|
||||
return CrookToString((AccusedCrook)(int)_CaseFile["Accused Crook"].Number);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ using VRC.Udon.Common.Interfaces;
|
||||
using VRC.Udon.Serialization.OdinSerializer.Utilities;
|
||||
|
||||
|
||||
public enum GameType
|
||||
public enum RoundType
|
||||
{
|
||||
None,
|
||||
LocateTheCrook,
|
||||
@@ -18,9 +18,9 @@ public enum GameType
|
||||
ChaseCarmen
|
||||
}
|
||||
|
||||
public enum QuestionType
|
||||
public enum RoundSegmentType
|
||||
{
|
||||
BetweenRounds,
|
||||
BetweenSegments,
|
||||
|
||||
MultipleChoice,
|
||||
LightningRound,
|
||||
@@ -63,10 +63,10 @@ public class GameManagerBase : UdonSharpBehaviour
|
||||
_HostCardUseButtonDown_Internal();
|
||||
}
|
||||
|
||||
protected virtual HostCardInterfaceBase GetHostCardInterface(QuestionType Question)
|
||||
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(GameType.None, Question);
|
||||
return _HostCard.EnableHostCardDisplay(RoundType.None, Question);
|
||||
}
|
||||
|
||||
protected virtual void _HostCardUseButtonDown_Internal()
|
||||
@@ -80,28 +80,32 @@ public class GameManagerBase : UdonSharpBehaviour
|
||||
public virtual void LoadQuestionData(DataToken Data) { }
|
||||
|
||||
|
||||
protected string GameTypeToString(GameType Type)
|
||||
protected string RoundTypeToString(RoundType Type)
|
||||
{
|
||||
switch ((int)Type)
|
||||
{
|
||||
case (int)GameType.LocateTheCrook: return "Locate The Crook";
|
||||
case (int)GameType.RecoverTheLoot: return "Recover The Loot";
|
||||
case (int)GameType.ChaseCarmen: return "Chase Carmen";
|
||||
case (int)RoundType.LocateTheCrook: return "Locate The Crook";
|
||||
case (int)RoundType.RecoverTheLoot: return "Recover The Loot";
|
||||
case (int)RoundType.ChaseCarmen: return "Chase Carmen";
|
||||
default: return "[[ERROR]]";
|
||||
}
|
||||
}
|
||||
|
||||
protected string QuestionTypeToString(QuestionType Type)
|
||||
protected string RoundSegmentTypeToString(RoundSegmentType Type)
|
||||
{
|
||||
switch ((int)Type)
|
||||
switch (Type)
|
||||
{
|
||||
case (int)QuestionType.BetweenRounds: return "None";
|
||||
case (int)QuestionType.MultipleChoice: return "Standard Round";
|
||||
case (int)QuestionType.LightningRound: return "Lightning Round";
|
||||
case (int)QuestionType.DumpsterDive: return "Dumpster Dive";
|
||||
case (int)QuestionType.TheChase: return "The Chase";
|
||||
case (int)QuestionType.FinalRound: return "Final Round";
|
||||
case (int)QuestionType.Tiebreaker: return "Tiebreaker";
|
||||
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";
|
||||
|
||||
default: return "[[ERROR]]";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
_QuestionsList.Clear();
|
||||
|
||||
HostCardBetweenRoundsInterface Interface =
|
||||
(HostCardBetweenRoundsInterface)GetHostCardInterface(QuestionType.BetweenRounds);
|
||||
(HostCardBetweenRoundsInterface)GetHostCardInterface(RoundSegmentType.BetweenSegments);
|
||||
|
||||
DataList DataDict = Data.DataList;
|
||||
for (int i = 0; i < DataDict.Count; i++)
|
||||
@@ -87,11 +87,11 @@ public class GameManagerRound1 : GameManagerBase
|
||||
private void NewMultipleChoiceQuestion()
|
||||
{
|
||||
HostCardMultipleChoiceInterface Interface =
|
||||
(HostCardMultipleChoiceInterface)GetHostCardInterface(QuestionType.MultipleChoice);
|
||||
(HostCardMultipleChoiceInterface)GetHostCardInterface(RoundSegmentType.MultipleChoice);
|
||||
|
||||
ResetMultipleChoiceInterface(Interface);
|
||||
|
||||
Interface.HeaderUI.text = QuestionTypeToString((QuestionType)((int)_CurrentQuestion["Type"].Number));
|
||||
Interface.HeaderUI.text = RoundSegmentTypeToString((RoundSegmentType)((int)_CurrentQuestion["Type"].Number));
|
||||
|
||||
DataList ClueStrings = _CurrentQuestion["Clues"].DataList;
|
||||
for (int i = 0; i < Interface.CluesUI.Length && i < ClueStrings.Count; i++)
|
||||
@@ -119,7 +119,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
private void MultipleChoiceRevealChoice1()
|
||||
{
|
||||
HostCardMultipleChoiceInterface Interface =
|
||||
(HostCardMultipleChoiceInterface)GetHostCardInterface(QuestionType.MultipleChoice);
|
||||
(HostCardMultipleChoiceInterface)GetHostCardInterface(RoundSegmentType.MultipleChoice);
|
||||
|
||||
Interface.ChoiceButtonImages[0].color = (_QuestionCorrectResponse == 1) ? Color.green : Color.red;
|
||||
|
||||
@@ -131,7 +131,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
private void MultipleChoiceRevealChoice2()
|
||||
{
|
||||
HostCardMultipleChoiceInterface Interface =
|
||||
(HostCardMultipleChoiceInterface)GetHostCardInterface(QuestionType.MultipleChoice);
|
||||
(HostCardMultipleChoiceInterface)GetHostCardInterface(RoundSegmentType.MultipleChoice);
|
||||
|
||||
Interface.ChoiceButtonImages[1].color = (_QuestionCorrectResponse == 2) ? Color.green : Color.red;
|
||||
|
||||
@@ -143,7 +143,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
private void MultipleChoiceRevealChoice3()
|
||||
{
|
||||
HostCardMultipleChoiceInterface Interface =
|
||||
(HostCardMultipleChoiceInterface)GetHostCardInterface(QuestionType.MultipleChoice);
|
||||
(HostCardMultipleChoiceInterface)GetHostCardInterface(RoundSegmentType.MultipleChoice);
|
||||
|
||||
Interface.ChoiceButtonImages[2].color = (_QuestionCorrectResponse == 3) ? Color.green : Color.red;
|
||||
DataList Choices = _CurrentQuestion["Choices"].DataList;
|
||||
@@ -188,7 +188,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
}
|
||||
|
||||
HostCardMultipleChoiceInterface Interface =
|
||||
(HostCardMultipleChoiceInterface)GetHostCardInterface(QuestionType.MultipleChoice);
|
||||
(HostCardMultipleChoiceInterface)GetHostCardInterface(RoundSegmentType.MultipleChoice);
|
||||
|
||||
Interface.HeaderUI.text = "LOCKED IN";
|
||||
for (int i = 0; i < Interface.CluesUI.Length; i++)
|
||||
@@ -210,7 +210,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
private void MultipleChoiceRevealAnswersAndAssignPoints()
|
||||
{
|
||||
HostCardMultipleChoiceInterface Interface =
|
||||
(HostCardMultipleChoiceInterface)GetHostCardInterface(QuestionType.MultipleChoice);
|
||||
(HostCardMultipleChoiceInterface)GetHostCardInterface(RoundSegmentType.MultipleChoice);
|
||||
|
||||
Interface.HeaderUI.text = "ANSWER REVEALED";
|
||||
|
||||
@@ -229,9 +229,9 @@ public class GameManagerRound1 : GameManagerBase
|
||||
private void BeginLightningRound()
|
||||
{
|
||||
HostCardLightningRoundInterface Interface =
|
||||
(HostCardLightningRoundInterface)GetHostCardInterface(QuestionType.LightningRound);
|
||||
(HostCardLightningRoundInterface)GetHostCardInterface(RoundSegmentType.LightningRound);
|
||||
|
||||
Interface.HeaderUI.text = QuestionTypeToString((QuestionType)((int)_CurrentQuestion["Type"].Number)) + " | " + _CurrentQuestion["Location"].ToString();
|
||||
Interface.HeaderUI.text = RoundSegmentTypeToString((RoundSegmentType)((int)_CurrentQuestion["Type"].Number)) + " | " + _CurrentQuestion["Location"].ToString();
|
||||
for (int i = 0; i < Interface.ChoiceUI.Length && i < Interface.ChoiceButtons.Length; i++)
|
||||
{
|
||||
Interface.ChoiceUI[i].text = "";
|
||||
@@ -248,7 +248,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
DataDictionary CurrentQuestion = _CurrentQuestion["Questions"].DataList[Question - 1].DataDictionary;
|
||||
|
||||
HostCardLightningRoundInterface Interface =
|
||||
(HostCardLightningRoundInterface)GetHostCardInterface(QuestionType.LightningRound);
|
||||
(HostCardLightningRoundInterface)GetHostCardInterface(RoundSegmentType.LightningRound);
|
||||
|
||||
Interface.QuestionUI.text = CurrentQuestion["Question"].ToString();
|
||||
|
||||
@@ -275,7 +275,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
if (_QuestionCorrectResponse == Answer)
|
||||
{
|
||||
HostCardLightningRoundInterface Interface =
|
||||
(HostCardLightningRoundInterface)GetHostCardInterface(QuestionType.LightningRound);
|
||||
(HostCardLightningRoundInterface)GetHostCardInterface(RoundSegmentType.LightningRound);
|
||||
|
||||
for (int i = 0; i < Interface.ChoiceButtons.Length; i++)
|
||||
{
|
||||
@@ -322,9 +322,9 @@ public class GameManagerRound1 : GameManagerBase
|
||||
private void BeginTheChase()
|
||||
{
|
||||
HostCardTheChaseInterface Interface =
|
||||
(HostCardTheChaseInterface)GetHostCardInterface(QuestionType.TheChase);
|
||||
(HostCardTheChaseInterface)GetHostCardInterface(RoundSegmentType.TheChase);
|
||||
|
||||
Interface.HeaderUI.text = QuestionTypeToString((QuestionType)((int)_CurrentQuestion["Type"].Number));
|
||||
Interface.HeaderUI.text = RoundSegmentTypeToString((RoundSegmentType)((int)_CurrentQuestion["Type"].Number));
|
||||
Interface.ClueUI.text = "";
|
||||
for (int i = 0; i < Interface.ChoiceUI.Length && i < Interface.ChoiceButtons.Length; i++)
|
||||
{
|
||||
@@ -339,12 +339,12 @@ public class GameManagerRound1 : GameManagerBase
|
||||
private void PlayTheChaseMusic()
|
||||
{
|
||||
HostCardTheChaseInterface Interface =
|
||||
(HostCardTheChaseInterface)GetHostCardInterface(QuestionType.TheChase);
|
||||
(HostCardTheChaseInterface)GetHostCardInterface(RoundSegmentType.TheChase);
|
||||
|
||||
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_AudioManager, NetworkEventTarget.All,
|
||||
"PlayMusic", MusicEventType.TheChase);
|
||||
|
||||
Interface.HeaderUI.text = QuestionTypeToString(QuestionType.TheChase);
|
||||
Interface.HeaderUI.text = RoundSegmentTypeToString(RoundSegmentType.TheChase);
|
||||
Interface.ClueUI.text = "All of these questions are worth 5 Acme Crimebucks. Hands on your buzzers. Listen carefully. Here we go.";
|
||||
|
||||
EnableBuzzers();
|
||||
@@ -357,7 +357,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
DataDictionary CurrentClue = _CurrentQuestion["Clues"].DataList[Clue - 1].DataDictionary;
|
||||
|
||||
HostCardTheChaseInterface Interface =
|
||||
(HostCardTheChaseInterface)GetHostCardInterface(QuestionType.TheChase);
|
||||
(HostCardTheChaseInterface)GetHostCardInterface(RoundSegmentType.TheChase);
|
||||
|
||||
Interface.ClueUI.text = CurrentClue["Clue"].ToString();
|
||||
|
||||
@@ -413,7 +413,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
public void TheChaseEndClue()
|
||||
{
|
||||
HostCardTheChaseInterface Interface =
|
||||
(HostCardTheChaseInterface)GetHostCardInterface(QuestionType.TheChase);
|
||||
(HostCardTheChaseInterface)GetHostCardInterface(RoundSegmentType.TheChase);
|
||||
|
||||
for (int i = 0; i < Interface.ChoiceButtons.Length; i++)
|
||||
{
|
||||
@@ -430,9 +430,9 @@ public class GameManagerRound1 : GameManagerBase
|
||||
private void BeginFinalRound()
|
||||
{
|
||||
HostCardFinalRoundInterface Interface =
|
||||
(HostCardFinalRoundInterface)GetHostCardInterface(QuestionType.FinalRound);
|
||||
(HostCardFinalRoundInterface)GetHostCardInterface(RoundSegmentType.FinalRound);
|
||||
|
||||
Interface.HeaderUI.text = QuestionTypeToString((QuestionType)((int)_CurrentQuestion["Type"].Number)) + " | Showing Map Preview";
|
||||
Interface.HeaderUI.text = RoundSegmentTypeToString((RoundSegmentType)((int)_CurrentQuestion["Type"].Number)) + " | Showing Map Preview";
|
||||
|
||||
EnableRiskCards();
|
||||
|
||||
@@ -456,7 +456,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
private void PlayThinkingMusic()
|
||||
{
|
||||
HostCardBetweenRoundsInterface Interface =
|
||||
(HostCardBetweenRoundsInterface)GetHostCardInterface(QuestionType.BetweenRounds);
|
||||
(HostCardBetweenRoundsInterface)GetHostCardInterface(RoundSegmentType.BetweenSegments);
|
||||
Interface.HeaderUI.text = "Think about it...";
|
||||
|
||||
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_AudioManager, NetworkEventTarget.All,
|
||||
@@ -465,7 +465,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
}
|
||||
public void ThinkAboutItCountdownFinished()
|
||||
{
|
||||
GetHostCardInterface(QuestionType.FinalRound);
|
||||
GetHostCardInterface(RoundSegmentType.FinalRound);
|
||||
|
||||
for (int i = 0; i < _PlayerPodiums.Length; i++)
|
||||
{
|
||||
@@ -484,7 +484,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
private void FinalRoundRevealChoice1()
|
||||
{
|
||||
HostCardFinalRoundInterface Interface =
|
||||
(HostCardFinalRoundInterface)GetHostCardInterface(QuestionType.FinalRound);
|
||||
(HostCardFinalRoundInterface)GetHostCardInterface(RoundSegmentType.FinalRound);
|
||||
Interface.ChoiceButtonImages[0].color = (_QuestionCorrectResponse == 1) ? Color.green : Color.red;
|
||||
|
||||
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_AudioManager, NetworkEventTarget.All,
|
||||
@@ -495,7 +495,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
private void FinalRoundRevealChoice2()
|
||||
{
|
||||
HostCardFinalRoundInterface Interface =
|
||||
(HostCardFinalRoundInterface)GetHostCardInterface(QuestionType.FinalRound);
|
||||
(HostCardFinalRoundInterface)GetHostCardInterface(RoundSegmentType.FinalRound);
|
||||
Interface.ChoiceButtonImages[1].color = (_QuestionCorrectResponse == 2) ? Color.green : Color.red;
|
||||
|
||||
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_AudioManager, NetworkEventTarget.All,
|
||||
@@ -506,7 +506,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
private void FinalRoundRevealChoice3()
|
||||
{
|
||||
HostCardFinalRoundInterface Interface =
|
||||
(HostCardFinalRoundInterface)GetHostCardInterface(QuestionType.FinalRound);
|
||||
(HostCardFinalRoundInterface)GetHostCardInterface(RoundSegmentType.FinalRound);
|
||||
|
||||
Interface.ChoiceButtonImages[2].color = (_QuestionCorrectResponse == 3) ? Color.green : Color.red;
|
||||
DataList Choices = _CurrentQuestion["Choices"].DataList;
|
||||
@@ -551,7 +551,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
}
|
||||
|
||||
HostCardFinalRoundInterface Interface =
|
||||
(HostCardFinalRoundInterface)GetHostCardInterface(QuestionType.FinalRound);
|
||||
(HostCardFinalRoundInterface)GetHostCardInterface(RoundSegmentType.FinalRound);
|
||||
|
||||
Interface.HeaderUI.text = "LOCKED IN";
|
||||
for (int i = 0; i < Interface.CluesUI.Length; i++)
|
||||
@@ -603,7 +603,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
int PlayerNumber = _FinalRoundPlayersSortedByScore[PlayerPlace - 1];
|
||||
|
||||
HostCardBetweenRoundsInterface Interface =
|
||||
(HostCardBetweenRoundsInterface)GetHostCardInterface(QuestionType.BetweenRounds);
|
||||
(HostCardBetweenRoundsInterface)GetHostCardInterface(RoundSegmentType.BetweenSegments);
|
||||
|
||||
Interface.HeaderUI.text = "Player: " + _PlayerPodiums[PlayerNumber - 1].PlayerName;
|
||||
_PlayerPodiums[PlayerNumber - 1].EnableBuzzInEffect(true);
|
||||
@@ -644,7 +644,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
}
|
||||
|
||||
HostCardBetweenRoundsInterface Interface =
|
||||
(HostCardBetweenRoundsInterface)GetHostCardInterface(QuestionType.BetweenRounds);
|
||||
(HostCardBetweenRoundsInterface)GetHostCardInterface(RoundSegmentType.BetweenSegments);
|
||||
|
||||
bool TiebreakerNeeded = false;
|
||||
if (SortedPlayerScores[1] == SortedPlayerScores[2])
|
||||
@@ -700,7 +700,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
DisableBuzzers();
|
||||
|
||||
HostCardBetweenRoundsInterface Interface =
|
||||
(HostCardBetweenRoundsInterface)GetHostCardInterface(QuestionType.BetweenRounds);
|
||||
(HostCardBetweenRoundsInterface)GetHostCardInterface(RoundSegmentType.BetweenSegments);
|
||||
|
||||
_QuestionIndex++;
|
||||
if (_QuestionIndex >= _QuestionsList.Count)
|
||||
@@ -714,7 +714,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
_QuestionStage = 0;
|
||||
|
||||
// Again, why does this work, but not just casting to an enum?
|
||||
Interface.HeaderUI.text = "Upcoming Question: " + QuestionTypeToString((QuestionType)((int)_CurrentQuestion["Type"].Number));
|
||||
Interface.HeaderUI.text = "Upcoming Question: " + RoundSegmentTypeToString((RoundSegmentType)((int)_CurrentQuestion["Type"].Number));
|
||||
|
||||
EnableInteraction("Show Next Question");
|
||||
}
|
||||
@@ -862,10 +862,10 @@ public class GameManagerRound1 : GameManagerBase
|
||||
// solution was "it's not a problem, it's two numbers, they're the same fucking thing".
|
||||
switch ((int)_CurrentQuestion["Type"].Number)
|
||||
{
|
||||
case (int)QuestionType.MultipleChoice: AdvanceMultipleChoiceStage(); break;
|
||||
case (int)QuestionType.LightningRound: AdvanceLightningRoundQuestion(); break;
|
||||
case (int)QuestionType.TheChase: AdvanceTheChase(); break;
|
||||
case (int)QuestionType.FinalRound: AdvanceFinalRound(); break;
|
||||
case (int)RoundSegmentType.MultipleChoice: AdvanceMultipleChoiceStage(); break;
|
||||
case (int)RoundSegmentType.LightningRound: AdvanceLightningRoundQuestion(); break;
|
||||
case (int)RoundSegmentType.TheChase: AdvanceTheChase(); break;
|
||||
case (int)RoundSegmentType.FinalRound: AdvanceFinalRound(); break;
|
||||
}
|
||||
|
||||
RequestSerialization();
|
||||
@@ -955,8 +955,8 @@ public class GameManagerRound1 : GameManagerBase
|
||||
_CurrentQuestion = _QuestionsList[_QuestionIndex].DataDictionary;
|
||||
|
||||
HostCardBetweenRoundsInterface Interface =
|
||||
(HostCardBetweenRoundsInterface)GetHostCardInterface(QuestionType.BetweenRounds);
|
||||
Interface.HeaderUI.text = "Upcoming Question: " + QuestionTypeToString((QuestionType)((int)_CurrentQuestion["Type"].Number));
|
||||
(HostCardBetweenRoundsInterface)GetHostCardInterface(RoundSegmentType.BetweenSegments);
|
||||
Interface.HeaderUI.text = "Upcoming Question: " + RoundSegmentTypeToString((RoundSegmentType)((int)_CurrentQuestion["Type"].Number));
|
||||
|
||||
_GameHasBegun = true;
|
||||
return;
|
||||
@@ -965,8 +965,8 @@ public class GameManagerRound1 : GameManagerBase
|
||||
AdvanceQuestion();
|
||||
}
|
||||
|
||||
protected override HostCardInterfaceBase GetHostCardInterface(QuestionType Question)
|
||||
protected override HostCardInterfaceBase GetHostCardInterface(RoundSegmentType Question)
|
||||
{
|
||||
return _HostCard.EnableHostCardDisplay(GameType.LocateTheCrook, Question);
|
||||
return _HostCard.EnableHostCardDisplay(RoundType.LocateTheCrook, Question);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 6
|
||||
Data: 7
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
@@ -290,16 +290,76 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _LandmarkData
|
||||
Data: _AudioManager
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 18|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _LandmarkData
|
||||
Data: _AudioManager
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 19|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: AudioManager, Assembly-CSharp
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 4
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
- Name:
|
||||
Entry: 6
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <IsSerialized>k__BackingField
|
||||
Entry: 5
|
||||
Data: true
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 20|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 21|UnityEngine.SerializeField, UnityEngine.CoreModule
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 13
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _LandmarkData
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 22|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _LandmarkData
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 23|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: VRC.SDK3.Data.DataDictionary, VRCSDK3
|
||||
@@ -308,7 +368,7 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 19
|
||||
Data: 23
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -323,7 +383,7 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 20|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 24|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
@@ -347,13 +407,13 @@ MonoBehaviour:
|
||||
Data: _StageIndex
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 21|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 25|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _StageIndex
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 22|System.RuntimeType, mscorlib
|
||||
Data: 26|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: System.Int32, mscorlib
|
||||
@@ -362,7 +422,7 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 22
|
||||
Data: 26
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -377,7 +437,7 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 23|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 27|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
|
||||
@@ -23,6 +23,8 @@ public class GameManagerRound2 : GameManagerBase
|
||||
|
||||
[SerializeField] private LocationBoard _LocationBoard;
|
||||
|
||||
[SerializeField] private AudioManager _AudioManager;
|
||||
|
||||
private DataDictionary _LandmarkData;
|
||||
private int _StageIndex = 0;
|
||||
|
||||
@@ -62,7 +64,9 @@ public class GameManagerRound2 : GameManagerBase
|
||||
private void DisplayBriefing()
|
||||
{
|
||||
HostCardRecoverTheLootExplainerInterface RecoverTheLootInterface =
|
||||
(HostCardRecoverTheLootExplainerInterface)GetHostCardInterface(QuestionType.RecoverTheLootExplainer);
|
||||
(HostCardRecoverTheLootExplainerInterface)GetHostCardInterface(RoundSegmentType.RecoverTheLootExplainer);
|
||||
|
||||
RecoverTheLootInterface.HeaderUI.text = RoundSegmentTypeToString(RoundSegmentType.RecoverTheLootExplainer);
|
||||
}
|
||||
|
||||
private void PopulateLandmarkDataOnLocationBoard()
|
||||
@@ -87,12 +91,14 @@ public class GameManagerRound2 : GameManagerBase
|
||||
Debug.LogError("Malformed landmark entry. Ensure each landmark is a dictionary containing a 'Landmark' key.");
|
||||
}
|
||||
}
|
||||
|
||||
_LocationBoard.RandomiseLocations();
|
||||
}
|
||||
|
||||
private void PopulateLandmarkDataOnHostCard()
|
||||
private void BeginRound()
|
||||
{
|
||||
HostCardRecoverTheLootInterface RecoverTheLootInterface =
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(QuestionType.RecoverTheLoot);
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(RoundSegmentType.RecoverTheLoot);
|
||||
|
||||
DataList Landmarks = _LandmarkData["Landmarks"].DataList;
|
||||
for (int i = 0; i < Landmarks.Count; i++)
|
||||
@@ -102,28 +108,46 @@ public class GameManagerRound2 : GameManagerBase
|
||||
RecoverTheLootInterface.AddLandmarkName(i, Landmarks[i].DataDictionary["Landmark"].ToString());
|
||||
}
|
||||
}
|
||||
|
||||
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_AudioManager, NetworkEventTarget.All,
|
||||
"PlayMusicLoop", MusicEventType.RecoverTheLoot);
|
||||
}
|
||||
|
||||
|
||||
public void OnTheRightTrack()
|
||||
{
|
||||
HostCardRecoverTheLootInterface Interface =
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(QuestionType.RecoverTheLoot);
|
||||
Interface.SetComment("On the right track.", Color.green);
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(RoundSegmentType.RecoverTheLoot);
|
||||
Interface.SetComment("On the right track. You get a free turn.", Color.green);
|
||||
}
|
||||
|
||||
public void AlmostThere()
|
||||
{
|
||||
HostCardRecoverTheLootInterface Interface =
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(QuestionType.RecoverTheLoot);
|
||||
Interface.SetComment("Almost got it...", Color.yellow);
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(RoundSegmentType.RecoverTheLoot);
|
||||
Interface.SetComment("Almost got it. Another free turn.", Color.yellow);
|
||||
}
|
||||
|
||||
public void OutOfOrder(PanelType Type)
|
||||
{
|
||||
HostCardRecoverTheLootInterface Interface =
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(QuestionType.RecoverTheLoot);
|
||||
Interface.SetComment("Found " + PanelTypeToString(Type) + ". Remember the order: loot, warrant, crook. Use some strategy.", Color.yellow);
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(RoundSegmentType.RecoverTheLoot);
|
||||
|
||||
string PanelToken = "";
|
||||
switch (Type)
|
||||
{
|
||||
case PanelType.Loot:
|
||||
PanelToken = _CaseManager.GetLoot();
|
||||
break;
|
||||
case PanelType.Warrant:
|
||||
PanelToken = "the warrant";
|
||||
break;
|
||||
case PanelType.Crook:
|
||||
PanelToken = _CaseManager.GetAccusedCrook();
|
||||
break;
|
||||
}
|
||||
|
||||
Interface.SetComment("Found " + PanelToken + ". Remember the order: loot, warrant, crook. Use some strategy.", Color.yellow);
|
||||
}
|
||||
|
||||
// All of these next functions are the end of a turn, and should disable
|
||||
@@ -131,7 +155,7 @@ public class GameManagerRound2 : GameManagerBase
|
||||
public void NothingThere()
|
||||
{
|
||||
HostCardRecoverTheLootInterface Interface =
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(QuestionType.RecoverTheLoot);
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(RoundSegmentType.RecoverTheLoot);
|
||||
Interface.SetComment("Nothing there.", Color.black);
|
||||
|
||||
Interface.EnableAllPanelButtons(false);
|
||||
@@ -140,7 +164,7 @@ public class GameManagerRound2 : GameManagerBase
|
||||
public void AlreadyTried()
|
||||
{
|
||||
HostCardRecoverTheLootInterface Interface =
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(QuestionType.RecoverTheLoot);
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(RoundSegmentType.RecoverTheLoot);
|
||||
Interface.SetComment("Already tried that one.", Color.black);
|
||||
|
||||
Interface.EnableAllPanelButtons(false);
|
||||
@@ -149,21 +173,24 @@ public class GameManagerRound2 : GameManagerBase
|
||||
public void NiceStrategy()
|
||||
{
|
||||
HostCardRecoverTheLootInterface Interface =
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(QuestionType.RecoverTheLoot);
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(RoundSegmentType.RecoverTheLoot);
|
||||
Interface.SetComment("Nice strategy.", Color.green);
|
||||
|
||||
Interface.EnableAllPanelButtons(false);
|
||||
}
|
||||
|
||||
// This is for when the player wins the game. This should disable all
|
||||
// inputs, and should also enable victory animations.
|
||||
// This is for when a player wins the game. This should disable all inputs,
|
||||
// and should also enable victory animations.
|
||||
public void YoureWinner()
|
||||
{
|
||||
HostCardRecoverTheLootInterface Interface =
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(QuestionType.RecoverTheLoot);
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(RoundSegmentType.RecoverTheLoot);
|
||||
Interface.SetComment("Winner! Congratulations, [[PLAYER]]", Color.red);
|
||||
|
||||
Interface.EnableAllPanelButtons(false);
|
||||
|
||||
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_AudioManager, NetworkEventTarget.All,
|
||||
"StopMusic");
|
||||
}
|
||||
|
||||
|
||||
@@ -175,7 +202,7 @@ public class GameManagerRound2 : GameManagerBase
|
||||
"ResetPanelBoard");
|
||||
|
||||
HostCardRecoverTheLootInterface Interface =
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(QuestionType.RecoverTheLoot);
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(RoundSegmentType.RecoverTheLoot);
|
||||
|
||||
Interface.EnableAllPanelButtons(true);
|
||||
|
||||
@@ -183,9 +210,31 @@ public class GameManagerRound2 : GameManagerBase
|
||||
}
|
||||
|
||||
|
||||
protected override HostCardInterfaceBase GetHostCardInterface(QuestionType Question)
|
||||
public void PlayTheLoot()
|
||||
{
|
||||
return _HostCard.EnableHostCardDisplay(GameType.RecoverTheLoot, Question);
|
||||
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_AudioManager,
|
||||
NetworkEventTarget.All,
|
||||
"PlaySFX", SFXEventType.TheLoot);
|
||||
}
|
||||
|
||||
public void PlayTheWarrant()
|
||||
{
|
||||
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_AudioManager,
|
||||
NetworkEventTarget.All,
|
||||
"PlaySFX", SFXEventType.TheWarrant);
|
||||
}
|
||||
|
||||
public void PlayTheCrookTheme()
|
||||
{
|
||||
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_AudioManager,
|
||||
NetworkEventTarget.All,
|
||||
"PlayCrookTheme", _CaseManager.GetCrook());
|
||||
}
|
||||
|
||||
|
||||
protected override HostCardInterfaceBase GetHostCardInterface(RoundSegmentType Question)
|
||||
{
|
||||
return _HostCard.EnableHostCardDisplay(RoundType.RecoverTheLoot, Question);
|
||||
}
|
||||
|
||||
|
||||
@@ -194,15 +243,15 @@ public class GameManagerRound2 : GameManagerBase
|
||||
_StageIndex++;
|
||||
switch(_StageIndex)
|
||||
{
|
||||
case 1: DisplayBriefing(); break;
|
||||
case 2: PopulateLandmarkDataOnHostCard(); break;
|
||||
case 1: DisplayBriefing(); break;
|
||||
case 2: BeginRound(); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void Button_RevealPanel(int Panel)
|
||||
{
|
||||
((HostCardRecoverTheLootInterface)GetHostCardInterface(QuestionType.RecoverTheLoot))
|
||||
((HostCardRecoverTheLootInterface)GetHostCardInterface(RoundSegmentType.RecoverTheLoot))
|
||||
.DisablePanelButton(Panel);
|
||||
NetworkCalling.SendCustomNetworkEvent(
|
||||
(IUdonEventReceiver)_LocationBoard,
|
||||
|
||||
Reference in New Issue
Block a user