- 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:
Jamie Greunbaum 2025-07-27 20:24:44 -04:00
parent 8ea69143d9
commit 83bea35e17
12 changed files with 42 additions and 36 deletions

View File

@ -42,13 +42,13 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Texture: {fileID: 2800000, guid: 44aab33f67dfa2949a8bd0a7e20d40e7, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 0.5, y: 0.33333334}
m_Offset: {x: 0, y: 0.6666667}
m_Offset: {x: 0.5, y: 0.33333334}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}

View File

@ -46,7 +46,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: d99fce257e19ba94e9b1d9aea6dbe87f, type: 3}
m_Texture: {fileID: 2800000, guid: a9b59914da5ed7046b6ec6712d0782d9, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:

View File

@ -15,16 +15,6 @@ public enum ClueScreenType
Map
}
//public enum SubMap
//{
// NoLabels, // 0
// OneLabel, // 1
// TwoLabels, // 2
// ThreeLabels, // 3
// CorrectLit, // 4
// OnlyCorrect // 5
//}
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
public class CaseVideoSyncPlayer : UdonSharpBehaviour
@ -97,7 +87,7 @@ public class CaseVideoSyncPlayer : UdonSharpBehaviour
TextureInfo AdditionalTextureInfo = new TextureInfo();
AdditionalTextureInfo.WrapModeU = TextureWrapMode.Clamp;
AdditionalTextureInfo.WrapModeV = TextureWrapMode.Clamp;
AdditionalTextureInfo.GenerateMipMaps = false;
AdditionalTextureInfo.GenerateMipMaps = true;
_MapDownloader.DownloadImage(
MapURL, null, _UdonEventReceiverThis, AdditionalTextureInfo);
}
@ -125,6 +115,8 @@ public class CaseVideoSyncPlayer : UdonSharpBehaviour
}
public override void OnImageLoadError(IVRCImageDownload Result)
{
_MapDownloadsInProgress = false;
base.OnImageLoadError(Result);
}

View File

@ -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");

View File

@ -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)

View File

@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
m_Name: BoneFollower
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: ccbda9bf23e2f714c9226283c77a92e5,
serializedUdonProgramAsset: {fileID: 11400000, guid: 52ecc8a73071e8e40928c3609699fcf4,
type: 2}
udonAssembly:
assemblyError:

View File

@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
m_Name: InteractToggle
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: 405e38d3dfb2f514daeed0e28fbb4864,
serializedUdonProgramAsset: {fileID: 11400000, guid: 873dfce61b1514e429c92e0d2fded7de,
type: 2}
udonAssembly:
assemblyError:

View File

@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
m_Name: PlayerModSetter
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: f938e6c4ff027a74da405a1f9353fd2b,
serializedUdonProgramAsset: {fileID: 11400000, guid: e81558796a212ab4d88e305e2010f24b,
type: 2}
udonAssembly:
assemblyError:

View File

@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
m_Name: GlobalToggleObject
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: c49c9265a3ef24642a6a4465d0a78872,
serializedUdonProgramAsset: {fileID: 11400000, guid: 2fe8ced6184000f49bca526cd2c5891c,
type: 2}
udonAssembly:
assemblyError:

View File

@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
m_Name: MasterToggleObject
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: 04024a76ab1924042ba521e11cb76d91,
serializedUdonProgramAsset: {fileID: 11400000, guid: a2d01d9f36ac6df49831be249e48ecc4,
type: 2}
udonAssembly:
assemblyError:

View File

@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
m_Name: TrackingDataFollower
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: 17f8fbbe6cc186d4f8dbb057b01a4ec2,
serializedUdonProgramAsset: {fileID: 11400000, guid: 1b89d4552983c0448a7389decec3b555,
type: 2}
udonAssembly:
assemblyError:

View File

@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
m_Name: WorldAudioSettings
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: 128d924a3066b7546b2d1c73e61006ab,
serializedUdonProgramAsset: {fileID: 11400000, guid: 994b559b0f158b4499f8937980ed8694,
type: 2}
udonAssembly:
assemblyError: