- Added Crook intro themes, and integrated them into Round 2.

- Reorganised materials into more texture-oriented categories.
This commit is contained in:
Jamie Greunbaum
2025-06-18 03:07:14 -04:00
parent 5374cc5e1d
commit 7300259bf2
115 changed files with 2617 additions and 498 deletions
+628 -25
View File
@@ -44,7 +44,7 @@ MonoBehaviour:
Data:
- Name:
Entry: 12
Data: 9
Data: 20
- Name:
Entry: 7
Data:
@@ -287,13 +287,13 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _WhereInTheWorld
Data: _RecoverTheLoot
- Name: $v
Entry: 7
Data: 17|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _WhereInTheWorld
Data: _RecoverTheLoot
- Name: <UserType>k__BackingField
Entry: 9
Data: 10
@@ -341,13 +341,13 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _RockapellaIdent
Data: _WhereInTheWorld
- Name: $v
Entry: 7
Data: 20|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _RockapellaIdent
Data: _WhereInTheWorld
- Name: <UserType>k__BackingField
Entry: 9
Data: 10
@@ -395,13 +395,13 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _Ding
Data: _RockapellaIdent
- Name: $v
Entry: 7
Data: 23|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _Ding
Data: _RockapellaIdent
- Name: <UserType>k__BackingField
Entry: 9
Data: 10
@@ -425,19 +425,10 @@ MonoBehaviour:
Data: 24|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 2
Data: 1
- Name:
Entry: 7
Data: 25|UnityEngine.HeaderAttribute, UnityEngine.CoreModule
- Name: header
Entry: 1
Data: SFX
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data: 26|UnityEngine.SerializeField, UnityEngine.CoreModule
Data: 25|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
@@ -458,13 +449,13 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _Buzzer
Data: _Ding
- Name: $v
Entry: 7
Data: 27|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 26|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _Buzzer
Data: _Ding
- Name: <UserType>k__BackingField
Entry: 9
Data: 10
@@ -485,10 +476,19 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 28|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 27|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
Data: 2
- Name:
Entry: 7
Data: 28|UnityEngine.HeaderAttribute, UnityEngine.CoreModule
- Name: header
Entry: 1
Data: SFX
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data: 29|UnityEngine.SerializeField, UnityEngine.CoreModule
@@ -512,13 +512,13 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _TheLoot
Data: _Buzzer
- Name: $v
Entry: 7
Data: 30|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _TheLoot
Data: _Buzzer
- Name: <UserType>k__BackingField
Entry: 9
Data: 10
@@ -561,6 +561,609 @@ MonoBehaviour:
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: _TheLoot
- Name: $v
Entry: 7
Data: 33|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _TheLoot
- Name: <UserType>k__BackingField
Entry: 9
Data: 10
- Name: <SystemType>k__BackingField
Entry: 9
Data: 10
- 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: 34|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 35|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: _TheWarrant
- Name: $v
Entry: 7
Data: 36|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _TheWarrant
- Name: <UserType>k__BackingField
Entry: 9
Data: 10
- Name: <SystemType>k__BackingField
Entry: 9
Data: 10
- 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: 37|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 38|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: _CrookTheme_Contessa
- Name: $v
Entry: 7
Data: 39|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _CrookTheme_Contessa
- Name: <UserType>k__BackingField
Entry: 9
Data: 10
- Name: <SystemType>k__BackingField
Entry: 9
Data: 10
- 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: 40|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 2
- Name:
Entry: 7
Data: 41|UnityEngine.HeaderAttribute, UnityEngine.CoreModule
- Name: header
Entry: 1
Data: Crook Themes
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data: 42|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: _CrookTheme_DoubleTrouble
- Name: $v
Entry: 7
Data: 43|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _CrookTheme_DoubleTrouble
- Name: <UserType>k__BackingField
Entry: 9
Data: 10
- Name: <SystemType>k__BackingField
Entry: 9
Data: 10
- 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: 44|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 45|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: _CrookTheme_EarthaBrute
- Name: $v
Entry: 7
Data: 46|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _CrookTheme_EarthaBrute
- Name: <UserType>k__BackingField
Entry: 9
Data: 10
- Name: <SystemType>k__BackingField
Entry: 9
Data: 10
- 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: 47|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 48|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: _CrookTheme_Kneemoi
- Name: $v
Entry: 7
Data: 49|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _CrookTheme_Kneemoi
- Name: <UserType>k__BackingField
Entry: 9
Data: 10
- Name: <SystemType>k__BackingField
Entry: 9
Data: 10
- 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: 50|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 51|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: _CrookTheme_PattyLarceny
- Name: $v
Entry: 7
Data: 52|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _CrookTheme_PattyLarceny
- Name: <UserType>k__BackingField
Entry: 9
Data: 10
- Name: <SystemType>k__BackingField
Entry: 9
Data: 10
- 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: 53|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 54|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: _CrookTheme_Robocrook
- Name: $v
Entry: 7
Data: 55|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _CrookTheme_Robocrook
- Name: <UserType>k__BackingField
Entry: 9
Data: 10
- Name: <SystemType>k__BackingField
Entry: 9
Data: 10
- 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: 56|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 57|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: _CrookTheme_SarahNade
- Name: $v
Entry: 7
Data: 58|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _CrookTheme_SarahNade
- Name: <UserType>k__BackingField
Entry: 9
Data: 10
- Name: <SystemType>k__BackingField
Entry: 9
Data: 10
- 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: 59|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 60|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: _CrookTheme_VicTheSlick
- Name: $v
Entry: 7
Data: 61|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _CrookTheme_VicTheSlick
- Name: <UserType>k__BackingField
Entry: 9
Data: 10
- Name: <SystemType>k__BackingField
Entry: 9
Data: 10
- 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: 62|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 63|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: _CrookTheme_WonderRat
- Name: $v
Entry: 7
Data: 64|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _CrookTheme_WonderRat
- Name: <UserType>k__BackingField
Entry: 9
Data: 10
- Name: <SystemType>k__BackingField
Entry: 9
Data: 10
- 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: 65|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 66|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: 13
Data:
+76 -17
View File
@@ -11,6 +11,7 @@ public enum MusicEventType
None,
TheChase,
ThinkAboutIt,
RecoverTheLoot,
WhereInTheWorld,
RockapellaIdent
}
@@ -21,7 +22,8 @@ public enum SFXEventType
Ding,
Buzzer,
TheLoot
TheLoot,
TheWarrant
}
@@ -34,6 +36,7 @@ public class AudioManager : UdonSharpBehaviour
[Header("Music")]
[SerializeField] private AudioClip _TheChase = null;
[SerializeField] private AudioClip _ThinkAboutIt = null;
[SerializeField] private AudioClip _RecoverTheLoot = null;
[SerializeField] private AudioClip _WhereInTheWorld = null;
[SerializeField] private AudioClip _RockapellaIdent = null;
@@ -42,31 +45,50 @@ public class AudioManager : UdonSharpBehaviour
[SerializeField] private AudioClip _Buzzer = null;
[SerializeField] private AudioClip _TheLoot = null;
[SerializeField] private AudioClip _TheWarrant = null;
[Header("Crook Themes")]
[SerializeField] private AudioClip _CrookTheme_Contessa = null;
[SerializeField] private AudioClip _CrookTheme_DoubleTrouble = null;
[SerializeField] private AudioClip _CrookTheme_EarthaBrute = null;
[SerializeField] private AudioClip _CrookTheme_Kneemoi = null;
[SerializeField] private AudioClip _CrookTheme_PattyLarceny = null;
[SerializeField] private AudioClip _CrookTheme_Robocrook = null;
[SerializeField] private AudioClip _CrookTheme_SarahNade = null;
[SerializeField] private AudioClip _CrookTheme_VicTheSlick = null;
[SerializeField] private AudioClip _CrookTheme_WonderRat = null;
[NetworkCallable]
public void PlayMusic(MusicEventType MusicEvent)
{
PlayMusicInternal(MusicEvent, false);
_PlayMusic_Internal(MusicEvent, false);
}
[NetworkCallable]
public void PlayMusicLoop(MusicEventType MusicEvent)
{
PlayMusicInternal(MusicEvent, true);
_PlayMusic_Internal(MusicEvent, true);
}
private void PlayMusicInternal(MusicEventType MusicEvent, bool Loop)
[NetworkCallable]
public void StopMusic()
{
_PlayMusic_Internal(MusicEventType.None, false);
}
private void _PlayMusic_Internal(MusicEventType MusicEvent, bool Loop)
{
_MusicPlayer.Stop();
switch (MusicEvent)
{
case MusicEventType.TheChase: _MusicPlayer.clip = _TheChase; break;
case MusicEventType.ThinkAboutIt: _MusicPlayer.clip = _ThinkAboutIt; break;
case MusicEventType.WhereInTheWorld: _MusicPlayer.clip = _WhereInTheWorld; break;
case MusicEventType.RockapellaIdent: _MusicPlayer.clip = _RockapellaIdent; break;
default: _MusicPlayer.clip = null; break;
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;
}
_MusicPlayer.loop = Loop;
@@ -79,31 +101,68 @@ public class AudioManager : UdonSharpBehaviour
[NetworkCallable]
public void PlaySFX(SFXEventType SFXEvent)
{
PlaySFXInternal(SFXEvent);
_PlaySFX_Internal(SFXEvent);
}
[NetworkCallable]
public void PlaySFXAtPitch(SFXEventType SFXEvent, float Pitch)
{
PlaySFXInternal(SFXEvent, Pitch);
_PlaySFX_Internal(SFXEvent, Pitch);
}
private void PlaySFXInternal(SFXEventType SFXEvent, float Pitch = 1.0f)
private void _PlaySFX_Internal(SFXEventType SFXEvent, float Pitch = 1.0f)
{
_SFXPlayer.Stop();
switch (SFXEvent)
{
case SFXEventType.Ding: _SFXPlayer.clip = _Ding; break;
case SFXEventType.Buzzer: _SFXPlayer.clip = _Buzzer; break;
case SFXEventType.Ding: _SFXPlayer.clip = _Ding; break;
case SFXEventType.Buzzer: _SFXPlayer.clip = _Buzzer; break;
case SFXEventType.TheLoot: _SFXPlayer.clip = _TheLoot; break;
case SFXEventType.TheLoot: _SFXPlayer.clip = _TheLoot; break;
case SFXEventType.TheWarrant: _SFXPlayer.clip = _TheWarrant; break;
default: _SFXPlayer.clip = null; break;
default: _SFXPlayer.clip = null; break;
}
if (_SFXPlayer.clip != null)
{
_SFXPlayer.pitch = Pitch;
_SFXPlayer.Play();
_SFXPlayer.Play();
}
}
[NetworkCallable]
public void PlayCrookTheme(AccusedCrook Crook)
{
_PlayCrookTheme_Internal(Crook);
}
private void _PlayCrookTheme_Internal(AccusedCrook Crook)
{
_SFXPlayer.Stop();
switch (Crook)
{
case AccusedCrook.Contessa: _SFXPlayer.clip = _CrookTheme_Contessa; break;
case AccusedCrook.DoubleTrouble: _SFXPlayer.clip = _CrookTheme_DoubleTrouble; break;
case AccusedCrook.EarthaBrute: _SFXPlayer.clip = _CrookTheme_EarthaBrute; break;
case AccusedCrook.Kneemoi: _SFXPlayer.clip = _CrookTheme_Kneemoi; break;
case AccusedCrook.PattyLarceny: _SFXPlayer.clip = _CrookTheme_PattyLarceny; break;
case AccusedCrook.Robocrook: _SFXPlayer.clip = _CrookTheme_Robocrook; break;
case AccusedCrook.SarahNade: _SFXPlayer.clip = _CrookTheme_SarahNade; break;
case AccusedCrook.VicTheSlick: _SFXPlayer.clip = _CrookTheme_VicTheSlick; break;
case AccusedCrook.WonderRat: _SFXPlayer.clip = _CrookTheme_WonderRat; break;
default: _SFXPlayer.clip = null; break;
}
_SFXPlayer.pitch = 1.0f;
if (_SFXPlayer.clip != null)
{
_SFXPlayer.Play();
}
}
// A messy group of variables that are used for pitch correction of sound effects
+56 -1
View File
@@ -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,
@@ -32,20 +32,26 @@ public class HostCardManager : UdonSharpBehaviour
public override void OnPickup()
{
Networking.SetOwner(Networking.LocalPlayer, gameObject);
_StoredJumpImpulse = Networking.LocalPlayer.GetJumpImpulse();
Networking.LocalPlayer.SetJumpImpulse(0.0f);
_IsBeingHeld = true;
if (gameObject != null)
{
Networking.SetOwner(Networking.LocalPlayer, gameObject);
_StoredJumpImpulse = Networking.LocalPlayer.GetJumpImpulse();
Networking.LocalPlayer.SetJumpImpulse(0.0f);
_IsBeingHeld = true;
}
base.OnPickup();
}
public override void OnDrop()
{
Networking.SetOwner(Networking.InstanceOwner, gameObject);
Networking.LocalPlayer.SetJumpImpulse(_StoredJumpImpulse);
_StoredJumpImpulse = 0.0f;
_IsBeingHeld = false;
if (gameObject != null)
{
Networking.SetOwner(Networking.InstanceOwner, gameObject);
Networking.LocalPlayer.SetJumpImpulse(_StoredJumpImpulse);
_StoredJumpImpulse = 0.0f;
_IsBeingHeld = false;
}
base.OnDrop();
}
@@ -97,7 +103,7 @@ public class HostCardManager : UdonSharpBehaviour
}
public HostCardInterfaceBase EnableHostCardDisplay(GameType Game, QuestionType Question)
public HostCardInterfaceBase EnableHostCardDisplay(RoundType Game, RoundSegmentType Question)
{
_BetweenRoundsInterface.gameObject.SetActive(false);
_MultipleChoiceInterface.gameObject.SetActive(false);
@@ -110,41 +116,41 @@ public class HostCardManager : UdonSharpBehaviour
switch (Game)
{
case GameType.LocateTheCrook:
case RoundType.LocateTheCrook:
{
switch (Question)
{
case QuestionType.MultipleChoice:
case RoundSegmentType.MultipleChoice:
_MultipleChoiceInterface.gameObject.SetActive(true);
return _MultipleChoiceInterface;
case QuestionType.LightningRound:
case RoundSegmentType.LightningRound:
_LightningRoundInterface.gameObject.SetActive(true);
return _LightningRoundInterface;
case QuestionType.DumpsterDive: break;
case QuestionType.TheChase:
case RoundSegmentType.DumpsterDive: break;
case RoundSegmentType.TheChase:
_TheChaseInterface.gameObject.SetActive(true);
return _TheChaseInterface;
case QuestionType.FinalRound:
case RoundSegmentType.FinalRound:
_FinalRoundInterface.gameObject.SetActive(true);
return _FinalRoundInterface;
case QuestionType.Tiebreaker:
case RoundSegmentType.Tiebreaker:
_BetweenRoundsInterface.gameObject.SetActive(true);
return _BetweenRoundsInterface;
}
} break;
case GameType.RecoverTheLoot:
case RoundType.RecoverTheLoot:
{
switch(Question)
{
case QuestionType.RecoverTheLootExplainer:
case RoundSegmentType.RecoverTheLootExplainer:
_RecoverTheLootExplainerInterface.gameObject.SetActive(true);
return _RecoverTheLootExplainerInterface;
case QuestionType.RecoverTheLoot:
case RoundSegmentType.RecoverTheLoot:
_RecoverTheLootInterface.gameObject.SetActive(true);
return _RecoverTheLootInterface;
}
} break;
case GameType.ChaseCarmen:
case RoundType.ChaseCarmen:
{
} break;
@@ -44,7 +44,7 @@ MonoBehaviour:
Data:
- Name:
Entry: 12
Data: 14
Data: 17
- Name:
Entry: 7
Data:
@@ -362,19 +362,19 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: LocationPanelsEmpty
Data: LocationPanelInfoSheets
- Name: $v
Entry: 7
Data: 24|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: LocationPanelsEmpty
Data: LocationPanelInfoSheets
- Name: <UserType>k__BackingField
Entry: 7
Data: 25|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.GameObject[], UnityEngine.CoreModule
Data: UnityEngine.MeshRenderer[], UnityEngine.CoreModule
- Name:
Entry: 8
Data:
@@ -416,19 +416,73 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: LocationPanelsLoot
Data: LocationPanelsEmpty
- Name: $v
Entry: 7
Data: 27|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: LocationPanelsEmpty
- Name: <UserType>k__BackingField
Entry: 7
Data: 28|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.GameObject[], UnityEngine.CoreModule
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 28
- 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: 29|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: LocationPanelsLoot
- Name: $v
Entry: 7
Data: 30|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: LocationPanelsLoot
- Name: <UserType>k__BackingField
Entry: 9
Data: 25
Data: 28
- Name: <SystemType>k__BackingField
Entry: 9
Data: 25
Data: 28
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -443,7 +497,7 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 28|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 31|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 0
@@ -467,16 +521,16 @@ MonoBehaviour:
Data: LocationPanelsWarrant
- Name: $v
Entry: 7
Data: 29|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 32|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: LocationPanelsWarrant
- Name: <UserType>k__BackingField
Entry: 9
Data: 25
Data: 28
- Name: <SystemType>k__BackingField
Entry: 9
Data: 25
Data: 28
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -491,7 +545,7 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 30|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 33|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 0
@@ -515,70 +569,16 @@ MonoBehaviour:
Data: LocationPanelsCrook
- Name: $v
Entry: 7
Data: 31|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 34|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: LocationPanelsCrook
- Name: <UserType>k__BackingField
Entry: 9
Data: 25
Data: 28
- Name: <SystemType>k__BackingField
Entry: 9
Data: 25
- 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: 32|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: LocationPanelText
- Name: $v
Entry: 7
Data: 33|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: LocationPanelText
- Name: <UserType>k__BackingField
Entry: 7
Data: 34|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: TMPro.TextMeshProUGUI[], Unity.TextMeshPro
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 34
Data: 28
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -614,19 +614,19 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _Animator
Data: LocationPanelText
- Name: $v
Entry: 7
Data: 36|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _Animator
Data: LocationPanelText
- Name: <UserType>k__BackingField
Entry: 7
Data: 37|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.Animator, UnityEngine.AnimationModule
Data: TMPro.TextMeshProUGUI[], Unity.TextMeshPro
- Name:
Entry: 8
Data:
@@ -644,7 +644,7 @@ MonoBehaviour:
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: false
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 38|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
@@ -668,10 +668,124 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _ActiveSpinners
Data: _LocationSheetMaterialSelections
- Name: $v
Entry: 7
Data: 39|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _LocationSheetMaterialSelections
- Name: <UserType>k__BackingField
Entry: 7
Data: 40|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.Material[], UnityEngine.CoreModule
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 40
- 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: 41|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 42|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: _Animator
- Name: $v
Entry: 7
Data: 43|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _Animator
- Name: <UserType>k__BackingField
Entry: 7
Data: 44|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.Animator, UnityEngine.AnimationModule
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 44
- 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: 45|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: _ActiveSpinners
- Name: $v
Entry: 7
Data: 46|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _ActiveSpinners
@@ -693,120 +807,6 @@ MonoBehaviour:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 40|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 41|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- 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: _OrderIsCorrect
- Name: $v
Entry: 7
Data: 42|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _OrderIsCorrect
- Name: <UserType>k__BackingField
Entry: 7
Data: 43|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.Boolean[], mscorlib
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 43
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 3
Data: 1
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 44|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 45|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- 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: _HasBeenCheckedBefore
- Name: $v
Entry: 7
Data: 46|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _HasBeenCheckedBefore
- Name: <UserType>k__BackingField
Entry: 9
Data: 43
- Name: <SystemType>k__BackingField
Entry: 9
Data: 43
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 3
Data: 1
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 47|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
@@ -831,6 +831,186 @@ MonoBehaviour:
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: _OrderIsCorrect
- Name: $v
Entry: 7
Data: 49|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _OrderIsCorrect
- Name: <UserType>k__BackingField
Entry: 7
Data: 50|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.Boolean[], mscorlib
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 50
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 3
Data: 1
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 51|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 52|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- 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: _HasBeenCheckedBefore
- Name: $v
Entry: 7
Data: 53|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _HasBeenCheckedBefore
- Name: <UserType>k__BackingField
Entry: 9
Data: 50
- Name: <SystemType>k__BackingField
Entry: 9
Data: 50
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 3
Data: 1
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 54|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 55|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- 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: _RandomMaterialSettings
- Name: $v
Entry: 7
Data: 56|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _RandomMaterialSettings
- Name: <UserType>k__BackingField
Entry: 7
Data: 57|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.Int32[], mscorlib
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 57
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 3
Data: 1
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 58|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 2
- Name:
Entry: 7
Data: 59|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data: 60|UdonSharp.FieldChangeCallbackAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using TMPro;
using UdonSharp;
using UnityEngine;
@@ -15,32 +16,33 @@ public class LocationBoard : UdonSharpBehaviour
[SerializeField] private GameManagerRound2 _GameManager;
[SerializeField] private AudioManager _AudioManager;
[UdonSynced, FieldChangeCallback(nameof(LootLocation))] private int _LootLocation = 0;
[UdonSynced, FieldChangeCallback(nameof(WarrantLocation))] private int _WarrantLocation = 0;
[UdonSynced, FieldChangeCallback(nameof(CrookLocation))] private int _CrookLocation = 0;
[UdonSynced, FieldChangeCallback(nameof(LootLocation))] private int _LootLocation = 0;
[UdonSynced, FieldChangeCallback(nameof(WarrantLocation))] private int _WarrantLocation = 0;
[UdonSynced, FieldChangeCallback(nameof(CrookLocation))] private int _CrookLocation = 0;
public MeshRenderer[] LocationPanelInfoSheets;
public GameObject[] LocationPanelsEmpty;
public GameObject[] LocationPanelsLoot;
public GameObject[] LocationPanelsWarrant;
public GameObject[] LocationPanelsCrook;
public TextMeshProUGUI[] LocationPanelText;
[SerializeField] private Material[] _LocationSheetMaterialSelections;
private Animator _Animator;
[UdonSynced] private int _ActiveSpinners = 0;
[UdonSynced] private bool[] _OrderIsCorrect = new bool[3];
[UdonSynced] private bool[] _HasBeenCheckedBefore;
[UdonSynced, FieldChangeCallback(nameof(RandomMaterialSettings))] private int[] _RandomMaterialSettings;
private void Start()
{
_HasBeenCheckedBefore = new bool[LocationPanelsEmpty.Length];
_Animator = GetComponent<Animator>();
// ********** DEBUG **********
RandomiseLocation();
// ******** END DEBUG ********
}
[NetworkCallable]
@@ -168,14 +170,16 @@ public class LocationBoard : UdonSharpBehaviour
{
if (Panel == LootLocation)
{
SendCustomEventDelayedSeconds(nameof(PlayTheLoot), 0.35f);
_GameManager.SendCustomEventDelayedSeconds("PlayTheLoot", 0.35f);
}
else if (Panel == WarrantLocation)
{
_GameManager.SendCustomEventDelayedSeconds("PlayTheWarrant", 0.35f);
}
else if (Panel == CrookLocation)
{
_GameManager.SendCustomEventDelayedSeconds("PlayTheCrookTheme", 0.35f);
}
//else if (Panel == WarrantLocation)
//{
//}
//else if (Panel == CrookLocation)
//{
//}
}
if (_OrderIsCorrect[0] && _OrderIsCorrect[1] && _OrderIsCorrect[2])
@@ -188,14 +192,6 @@ public class LocationBoard : UdonSharpBehaviour
}
public void PlayTheLoot()
{
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_AudioManager,
NetworkEventTarget.All,
"PlaySFX", SFXEventType.TheLoot);
}
public void InitiateBoardReset() { _GameManager.LocationBoardReset(); }
[NetworkCallable]
@@ -209,7 +205,7 @@ public class LocationBoard : UdonSharpBehaviour
_OrderIsCorrect[0] = _OrderIsCorrect[1] = _OrderIsCorrect[2] = false;
}
public void RandomiseLocation()
public void RandomiseLocations()
{
Random.InitState(Networking.GetServerTimeInMilliseconds());
@@ -234,9 +230,41 @@ public class LocationBoard : UdonSharpBehaviour
_HasBeenCheckedBefore[i] = false;
}
RandomiseMaterials();
RequestSerialization();
}
private void RandomiseMaterials()
{
int[] MaterialsArray = new int[LocationPanelInfoSheets.Length];
int PreviousMaterial = 0;
for (int i = 0; i < MaterialsArray.Length; i++)
{
int RandomValue = PreviousMaterial;
while (RandomValue == PreviousMaterial)
{
RandomValue = Random.Range(0, _LocationSheetMaterialSelections.Length);
}
PreviousMaterial = RandomValue;
MaterialsArray[i] = RandomValue;
}
RandomMaterialSettings = MaterialsArray;
RequestSerialization();
}
private void ApplyRandomMaterials()
{
for (int i = 0; i < RandomMaterialSettings.Length; i++)
{
Material[] Materials = LocationPanelInfoSheets[i].materials;
Materials[1] = _LocationSheetMaterialSelections[RandomMaterialSettings[i]];
LocationPanelInfoSheets[i].materials = Materials;
}
}
private void PlaceEmpty(int Panel)
{
if (Panel > 0)
@@ -318,4 +346,14 @@ public class LocationBoard : UdonSharpBehaviour
}
get => _CrookLocation;
}
public int[] RandomMaterialSettings
{
set
{
_RandomMaterialSettings = value;
ApplyRandomMaterials();
}
get => _RandomMaterialSettings;
}
}