Recover The Loot is now completely functional as a game mode, and can be
controlled entirely with the host card.
This commit is contained in:
@@ -26,23 +26,9 @@ public enum QuestionType
|
||||
DumpsterDive,
|
||||
TheChase,
|
||||
FinalRound,
|
||||
Tiebreaker
|
||||
}
|
||||
Tiebreaker,
|
||||
|
||||
public enum MusicEventType
|
||||
{
|
||||
None,
|
||||
TheChase,
|
||||
ThinkAboutIt,
|
||||
WhereInTheWorld,
|
||||
RockapellaIdent
|
||||
}
|
||||
|
||||
public enum SFXEventType
|
||||
{
|
||||
None,
|
||||
Ding,
|
||||
Buzzer
|
||||
RecoverTheLoot
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -7,6 +7,15 @@ using VRC.Udon.Common.Interfaces;
|
||||
using VRC.SDKBase;
|
||||
|
||||
|
||||
public enum PanelType
|
||||
{
|
||||
Empty,
|
||||
Loot,
|
||||
Warrant,
|
||||
Crook
|
||||
}
|
||||
|
||||
|
||||
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
|
||||
public class GameManagerRound2 : GameManagerBase
|
||||
{
|
||||
@@ -14,16 +23,14 @@ public class GameManagerRound2 : GameManagerBase
|
||||
|
||||
protected override void InitialiseGameMode()
|
||||
{
|
||||
|
||||
|
||||
base.InitialiseGameMode();
|
||||
}
|
||||
|
||||
|
||||
public override void LoadQuestionData(DataToken Data)
|
||||
{
|
||||
HostCardBetweenRoundsInterface Interface =
|
||||
(HostCardBetweenRoundsInterface)GetHostCardInterface(QuestionType.BetweenRounds);
|
||||
HostCardRecoverTheLootInterface Interface =
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(QuestionType.RecoverTheLoot);
|
||||
|
||||
DataDictionary DataDict = Data.DataDictionary;
|
||||
|
||||
@@ -39,7 +46,9 @@ public class GameManagerRound2 : GameManagerBase
|
||||
DataDictionary LandmarkEntry = Landmarks[i].DataDictionary;
|
||||
if (LandmarkEntry.ContainsKey("Landmark"))
|
||||
{
|
||||
_LocationBoard.LocationPanelText[i].text = LandmarkEntry["Landmark"].ToString();
|
||||
string LandmarkName = LandmarkEntry["Landmark"].ToString();
|
||||
_LocationBoard.LocationPanelText[i].text = LandmarkName;
|
||||
Interface.AddLandmarkName(i, LandmarkName);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -66,6 +75,85 @@ public class GameManagerRound2 : GameManagerBase
|
||||
//EnableInteraction("Start Game");
|
||||
}
|
||||
|
||||
|
||||
public void OnTheRightTrack()
|
||||
{
|
||||
HostCardRecoverTheLootInterface Interface =
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(QuestionType.RecoverTheLoot);
|
||||
Interface.SetComment("On the right track.", Color.green);
|
||||
}
|
||||
|
||||
public void AlmostThere()
|
||||
{
|
||||
HostCardRecoverTheLootInterface Interface =
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(QuestionType.RecoverTheLoot);
|
||||
Interface.SetComment("Almost got it...", 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);
|
||||
}
|
||||
|
||||
// All of these next functions are the end of a turn, and should disable
|
||||
// all inputs to prevent messing up the game state.
|
||||
public void NothingThere()
|
||||
{
|
||||
HostCardRecoverTheLootInterface Interface =
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(QuestionType.RecoverTheLoot);
|
||||
Interface.SetComment("Nothing there.", Color.black);
|
||||
|
||||
Interface.EnableAllPanelButtons(false);
|
||||
}
|
||||
|
||||
public void AlreadyTried()
|
||||
{
|
||||
HostCardRecoverTheLootInterface Interface =
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(QuestionType.RecoverTheLoot);
|
||||
Interface.SetComment("Already tried that one.", Color.black);
|
||||
|
||||
Interface.EnableAllPanelButtons(false);
|
||||
}
|
||||
|
||||
public void NiceStrategy()
|
||||
{
|
||||
HostCardRecoverTheLootInterface Interface =
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(QuestionType.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.
|
||||
public void YoureWinner()
|
||||
{
|
||||
HostCardRecoverTheLootInterface Interface =
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(QuestionType.RecoverTheLoot);
|
||||
Interface.SetComment("Winner! Congratulations, [[PLAYER]]", Color.red);
|
||||
|
||||
Interface.EnableAllPanelButtons(false);
|
||||
}
|
||||
|
||||
|
||||
public void LocationBoardReset()
|
||||
{
|
||||
NetworkCalling.SendCustomNetworkEvent(
|
||||
(IUdonEventReceiver)_LocationBoard,
|
||||
NetworkEventTarget.All,
|
||||
"ResetPanelBoard");
|
||||
|
||||
HostCardRecoverTheLootInterface Interface =
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(QuestionType.RecoverTheLoot);
|
||||
|
||||
Interface.EnableAllPanelButtons(true);
|
||||
|
||||
Interface.SetComment("[[PLAYER]], your turn.", Color.black);
|
||||
}
|
||||
|
||||
|
||||
protected override HostCardInterfaceBase GetHostCardInterface(QuestionType Question)
|
||||
{
|
||||
return _HostCard.EnableHostCardDisplay(GameType.RecoverTheLoot, Question);
|
||||
@@ -96,4 +184,44 @@ public class GameManagerRound2 : GameManagerBase
|
||||
|
||||
//AdvanceQuestion();
|
||||
}
|
||||
|
||||
|
||||
public void Button_RevealPanel(int Panel)
|
||||
{
|
||||
((HostCardRecoverTheLootInterface)GetHostCardInterface(QuestionType.RecoverTheLoot))
|
||||
.DisablePanelButton(Panel);
|
||||
NetworkCalling.SendCustomNetworkEvent(
|
||||
(IUdonEventReceiver)_LocationBoard,
|
||||
NetworkEventTarget.All,
|
||||
"RevealPanel", Panel);
|
||||
}
|
||||
|
||||
public void Button_RevealPanel1() { Button_RevealPanel(1); }
|
||||
public void Button_RevealPanel2() { Button_RevealPanel(2); }
|
||||
public void Button_RevealPanel3() { Button_RevealPanel(3); }
|
||||
public void Button_RevealPanel4() { Button_RevealPanel(4); }
|
||||
public void Button_RevealPanel5() { Button_RevealPanel(5); }
|
||||
public void Button_RevealPanel6() { Button_RevealPanel(6); }
|
||||
public void Button_RevealPanel7() { Button_RevealPanel(7); }
|
||||
public void Button_RevealPanel8() { Button_RevealPanel(8); }
|
||||
public void Button_RevealPanel9() { Button_RevealPanel(9); }
|
||||
public void Button_RevealPanel10() { Button_RevealPanel(10); }
|
||||
public void Button_RevealPanel11() { Button_RevealPanel(11); }
|
||||
public void Button_RevealPanel12() { Button_RevealPanel(12); }
|
||||
public void Button_RevealPanel13() { Button_RevealPanel(13); }
|
||||
public void Button_RevealPanel14() { Button_RevealPanel(14); }
|
||||
public void Button_RevealPanel15() { Button_RevealPanel(15); }
|
||||
|
||||
|
||||
private string PanelTypeToString(PanelType Type)
|
||||
{
|
||||
switch(Type)
|
||||
{
|
||||
case PanelType.Empty: return "Empty";
|
||||
case PanelType.Loot: return "Loot";
|
||||
case PanelType.Warrant: return "Warrant";
|
||||
case PanelType.Crook: return "Crook";
|
||||
default: return "[[ERROR]]";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user