- Floor maps were made a more appropriate size, and gameplay timing adjusted.

- Markers now become entirely vertical when dropped by non-VR players.
- Created more music loops.
This commit is contained in:
Jamie Greunbaum
2025-06-25 03:35:38 -04:00
parent 1f92803fc6
commit 44b78fb8b8
53 changed files with 17557 additions and 1559 deletions
File diff suppressed because it is too large Load Diff
+31 -6
View File
@@ -9,9 +9,18 @@ using VRC.Udon;
public enum MusicEventType
{
None,
CarmenSandiegoTheme,
CarmenSandiegoWindDown,
TheChase,
ThinkAboutIt,
RecoverTheLoot,
IFeelGood,
CarmenChaseMusic,
WhereInTheWorld,
RockapellaIdent
}
@@ -38,9 +47,17 @@ public class AudioManager : UdonSharpBehaviour
[SerializeField] private AudioSource _SFXPlayer = null;
[Header("Music")]
[SerializeField] private AudioClip _CarmenSandiegoTheme = null;
[SerializeField] private AudioClip _CarmenSandiegoWindDown = null;
[SerializeField] private AudioClip _TheChase = null;
[SerializeField] private AudioClip _ThinkAboutIt = null;
[SerializeField] private AudioClip _RecoverTheLoot = null;
[SerializeField] private AudioClip _IFeelGood = null;
[SerializeField] private AudioClip _CarmenChaseMusic = null;
[SerializeField] private AudioClip _WhereInTheWorld = null;
[SerializeField] private AudioClip _RockapellaIdent = null;
@@ -92,12 +109,20 @@ public class AudioManager : UdonSharpBehaviour
switch (MusicEvent)
{
case MusicEventType.TheChase: _MusicPlayer.clip = _TheChase; break;
case MusicEventType.ThinkAboutIt: _MusicPlayer.clip = _ThinkAboutIt; break;
case MusicEventType.RecoverTheLoot: _MusicPlayer.clip = _RecoverTheLoot; break;
case MusicEventType.WhereInTheWorld: _MusicPlayer.clip = _WhereInTheWorld; break;
case MusicEventType.RockapellaIdent: _MusicPlayer.clip = _RockapellaIdent; break;
default: _MusicPlayer.clip = null; break;
case MusicEventType.CarmenSandiegoTheme: _MusicPlayer.clip = _CarmenSandiegoTheme; break;
case MusicEventType.CarmenSandiegoWindDown: _MusicPlayer.clip = _CarmenSandiegoWindDown; break;
case MusicEventType.TheChase: _MusicPlayer.clip = _TheChase; break;
case MusicEventType.ThinkAboutIt: _MusicPlayer.clip = _ThinkAboutIt; break;
case MusicEventType.RecoverTheLoot: _MusicPlayer.clip = _RecoverTheLoot; break;
case MusicEventType.IFeelGood: _MusicPlayer.clip = _IFeelGood; break;
case MusicEventType.CarmenChaseMusic: _MusicPlayer.clip = _CarmenChaseMusic; break;
case MusicEventType.WhereInTheWorld: _MusicPlayer.clip = _WhereInTheWorld; break;
case MusicEventType.RockapellaIdent: _MusicPlayer.clip = _RockapellaIdent; break;
default: _MusicPlayer.clip = null; break;
}
_MusicPlayer.loop = Loop;
@@ -92,7 +92,7 @@ public class CaseManager : UdonSharpBehaviour
ErrorString = "Ensure the 'Round 3' dictionary entry is a dictionary with a key called 'Continent' and an integer value.";
}
ContinueToRound3();
ContinueToRound1();
}
else
{
@@ -67,6 +67,8 @@ public class GameManagerRound2 : GameManagerBase
(HostCardRecoverTheLootExplainerInterface)GetHostCardInterface(RoundSegmentType.RecoverTheLootExplainer);
RecoverTheLootInterface.HeaderUI.text = RoundSegmentTypeToString(RoundSegmentType.RecoverTheLootExplainer);
EnableInteraction("Begin Round");
}
private void PopulateLandmarkDataOnLocationBoard()
@@ -191,6 +193,8 @@ public class GameManagerRound2 : GameManagerBase
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_AudioManager, NetworkEventTarget.All,
"StopMusic");
EnableInteraction("Continue with the game in whatever way ends up being necessary when this is implemented");
}
@@ -246,11 +250,14 @@ public class GameManagerRound2 : GameManagerBase
protected override void _HostCardUseButtonDown_Internal()
{
DisableInteraction();
_StageIndex++;
switch(_StageIndex)
{
case 1: DisplayBriefing(); break;
case 2: BeginRound(); break;
case 3: _CaseManager.ContinueToRound3(); break;
}
}
@@ -44,7 +44,7 @@ MonoBehaviour:
Data:
- Name:
Entry: 12
Data: 12
Data: 13
- Name:
Entry: 7
Data:
@@ -578,10 +578,64 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _Timer
Data: _GameStatus
- Name: $v
Entry: 7
Data: 36|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _GameStatus
- Name: <UserType>k__BackingField
Entry: 7
Data: 37|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: GameStatus, Assembly-CSharp
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 29
- 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: false
- Name: _fieldAttributes
Entry: 7
Data: 38|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 0
- 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: _Timer
- Name: $v
Entry: 7
Data: 39|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _Timer
@@ -605,7 +659,7 @@ MonoBehaviour:
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 37|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 40|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 0
@@ -629,7 +683,7 @@ MonoBehaviour:
Data: _SuccessCounter
- Name: $v
Entry: 7
Data: 38|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 41|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _SuccessCounter
@@ -653,7 +707,7 @@ MonoBehaviour:
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 39|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 42|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 0
@@ -677,7 +731,7 @@ MonoBehaviour:
Data: _FailureCounter
- Name: $v
Entry: 7
Data: 40|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 43|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _FailureCounter
@@ -701,7 +755,7 @@ MonoBehaviour:
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 41|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 44|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 0
@@ -15,6 +15,15 @@ public enum ContinentMap
SouthAmerica
}
public enum GameStatus
{
Pregame,
Begin,
RanOutOfTime,
RanOutOfMarkers,
Win
}
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
public class GameManagerRound3 : GameManagerBase
@@ -30,7 +39,9 @@ public class GameManagerRound3 : GameManagerBase
private DataDictionary _ContinentData;
private int _StageIndex = 0;
private GameStatus _GameStatus = GameStatus.Pregame;
private int _Timer = TIMER_LENGTH;
private const float LENGTH_OF_ONE_SECOND = 1.04444444444444444f;
private const int TIMER_LENGTH = 45;
private int _SuccessCounter = 0;
@@ -69,7 +80,7 @@ public class GameManagerRound3 : GameManagerBase
Debug.LogError("Malformed round data. Ensure Round 3 contains a continent to use for the map.");
}
EnableInteraction("Start Game");
EnableInteraction("Display Briefing");
}
private void DisplayBriefing()
@@ -78,6 +89,8 @@ public class GameManagerRound3 : GameManagerBase
(HostCardCaptureCarmenExplainerInterface)GetHostCardInterface(RoundSegmentType.CaptureCarmenExplainer);
CaptureCarmenExplainerInterface.HeaderUI.text = RoundSegmentTypeToString(RoundSegmentType.CaptureCarmenExplainer);
EnableInteraction("Begin");
}
@@ -86,6 +99,29 @@ public class GameManagerRound3 : GameManagerBase
UpdateInterface();
GetCurrentMarker().EnablePickup(true);
StartTimer();
}
private void StartTimer()
{
_AudioManager.PlayMusicLoop(MusicEventType.CarmenChaseMusic);
_GameStatus = GameStatus.Begin;
_Timer = TIMER_LENGTH;
SendCustomEventDelayedSeconds(nameof(TickTimer), LENGTH_OF_ONE_SECOND);
}
public void TickTimer()
{
_Timer--;
if (_Timer < 0)
{
GameHasBeenLost();
return;
}
SendCustomEventDelayedSeconds(nameof(TickTimer), LENGTH_OF_ONE_SECOND);
}
public void CorrectResponse()
@@ -94,6 +130,7 @@ public class GameManagerRound3 : GameManagerBase
GetCurrentMarker().EnablePickup(false);
_FailureCounter = 0;
_SuccessCounter++;
if (_SuccessCounter >= MAX_SUCCESS_COUNT)
{
@@ -155,15 +192,43 @@ public class GameManagerRound3 : GameManagerBase
public void GameHasBeenWon()
{
HostCardBetweenRoundsInterface GameWinInterface =
(HostCardBetweenRoundsInterface)GetHostCardInterface(RoundSegmentType.BetweenSegments);
if ((int)_GameStatus <= (int)GameStatus.Begin)
{
GameStatusUpdate(GameStatus.Win);
GameWinInterface.HeaderUI.text = "The player has won the game.";
HostCardBetweenRoundsInterface GameWinInterface =
(HostCardBetweenRoundsInterface)GetHostCardInterface(RoundSegmentType.BetweenSegments);
GameWinInterface.HeaderUI.text = "The player has won the game. " + _Timer + " seconds to spare.";
_AudioManager.PlayMusicLoop(MusicEventType.CarmenSandiegoWindDown);
}
}
public void GameHasBeenLost(bool RanOutOfMarkers = false)
{
Debug.LogError("Game was lost. Ran out of " + (RanOutOfMarkers ? "markers" : "time") + ".");
if ((int)_GameStatus != (int)GameStatus.Win)
{
for (int i = 0; i < _Markers.Length; i++)
{
_Markers[i].EnablePickup(false);
}
GameStatusUpdate(RanOutOfMarkers ? GameStatus.RanOutOfMarkers : GameStatus.RanOutOfTime);
HostCardBetweenRoundsInterface GameLossInterface =
(HostCardBetweenRoundsInterface)GetHostCardInterface(RoundSegmentType.BetweenSegments);
GameLossInterface.HeaderUI.text = "The player has lost. " + _SuccessCounter + " countries in " + TIMER_LENGTH + " seconds.";
_AudioManager.StopMusic();
}
}
private void GameStatusUpdate(GameStatus NewStatus)
{
if ((int)_GameStatus <= (int)GameStatus.Begin)
{
_GameStatus = NewStatus;
}
}
@@ -195,6 +260,8 @@ public class GameManagerRound3 : GameManagerBase
protected override void _HostCardUseButtonDown_Internal()
{
DisableInteraction();
_StageIndex++;
switch (_StageIndex)
{
-2
View File
@@ -46,8 +46,6 @@ public class FloorMap : UdonSharpBehaviour
_ChosenCountries[i] = Location.Country;
_ChosenCities[i] = Location.City;
}
Debug.LogError("Current location: " + _ChosenCities[_CurrentCountry] + ", " + _ChosenCountries[_CurrentCountry]);
}
public int NextCountry()
+8 -1
View File
@@ -3,7 +3,7 @@ using UdonSharp;
using UnityEngine;
using VRC.SDK3.Components;
using VRC.SDK3.Data;
using static UnityEditor.FilePathAttribute;
using VRC.SDKBase;
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
@@ -60,6 +60,13 @@ public class FloorMapMarker : UdonSharpBehaviour
public override void OnDrop()
{
IsGrabbed = false;
VRCPlayerApi Owner = Networking.GetOwner(gameObject);
if (!Owner.IsUserInVR())
{
transform.eulerAngles = new Vector3(0.0f, transform.eulerAngles.y, 0.0f);
}
CheckCollisions();
base.OnDrop();
@@ -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:
@@ -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:
@@ -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:
@@ -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:
@@ -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:
@@ -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:
@@ -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: