Serious work has started on Round 2, and also a system for loading case files.
This commit is contained in:
@@ -0,0 +1,515 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
||||
m_Name: AudioManager
|
||||
m_EditorClassIdentifier:
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: 863c65bf15c958f4ba680b42971061e5,
|
||||
type: 2}
|
||||
udonAssembly:
|
||||
assemblyError:
|
||||
sourceCsScript: {fileID: 11500000, guid: 518bff42d8b5f444a886ecc058f2c7c0, type: 3}
|
||||
scriptVersion: 2
|
||||
compiledVersion: 2
|
||||
behaviourSyncMode: 4
|
||||
hasInteractEvent: 0
|
||||
scriptID: -966144156537998684
|
||||
serializationData:
|
||||
SerializedFormat: 2
|
||||
SerializedBytes:
|
||||
ReferencedUnityObjects: []
|
||||
SerializedBytesString:
|
||||
Prefab: {fileID: 0}
|
||||
PrefabModificationsReferencedUnityObjects: []
|
||||
PrefabModifications: []
|
||||
SerializationNodes:
|
||||
- Name: fieldDefinitions
|
||||
Entry: 7
|
||||
Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[UdonSharp.Compiler.FieldDefinition,
|
||||
UdonSharp.Editor]], mscorlib
|
||||
- Name: comparer
|
||||
Entry: 7
|
||||
Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String,
|
||||
mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 8
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _MusicPlayer
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _MusicPlayer
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 3|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: UnityEngine.AudioSource, UnityEngine.AudioModule
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 3
|
||||
- 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: 4|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 5|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: _SFXPlayer
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 6|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _SFXPlayer
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 3
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 3
|
||||
- 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: 7|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 8|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: _TheChase
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 9|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _TheChase
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 10|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: UnityEngine.AudioClip, UnityEngine.AudioModule
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- 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: 11|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 2
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 12|UnityEngine.HeaderAttribute, UnityEngine.CoreModule
|
||||
- Name: header
|
||||
Entry: 1
|
||||
Data: Music
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 13|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: _ThinkAboutIt
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 14|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _ThinkAboutIt
|
||||
- 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: 15|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 16|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: _WhereInTheWorld
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 17|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _WhereInTheWorld
|
||||
- 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: 18|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 19|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: _RockapellaIdent
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 20|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _RockapellaIdent
|
||||
- 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: 21|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 22|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: _Ding
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 23|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _Ding
|
||||
- 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: 24|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 2
|
||||
- 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
|
||||
- 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: _Buzzer
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 27|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _Buzzer
|
||||
- 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: 28|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 29|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:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c6260149af250ea46909414a90204edb
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,117 @@
|
||||
|
||||
using System.Net.NetworkInformation;
|
||||
using UdonSharp;
|
||||
using UnityEngine;
|
||||
using VRC.SDK3.UdonNetworkCalling;
|
||||
using VRC.SDKBase;
|
||||
using VRC.Udon;
|
||||
|
||||
|
||||
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
|
||||
public class AudioManager : UdonSharpBehaviour
|
||||
{
|
||||
[SerializeField] private AudioSource _MusicPlayer = null;
|
||||
[SerializeField] private AudioSource _SFXPlayer = null;
|
||||
|
||||
[Header("Music")]
|
||||
[SerializeField] private AudioClip _TheChase = null;
|
||||
[SerializeField] private AudioClip _ThinkAboutIt = null;
|
||||
[SerializeField] private AudioClip _WhereInTheWorld = null;
|
||||
[SerializeField] private AudioClip _RockapellaIdent = null;
|
||||
|
||||
[Header("SFX")]
|
||||
[SerializeField] private AudioClip _Ding = null;
|
||||
[SerializeField] private AudioClip _Buzzer = null;
|
||||
|
||||
|
||||
[NetworkCallable]
|
||||
public void PlayMusic(MusicEventType MusicEvent)
|
||||
{
|
||||
PlayMusicInternal(MusicEvent, false);
|
||||
}
|
||||
|
||||
[NetworkCallable]
|
||||
public void PlayMusicLoop(MusicEventType MusicEvent)
|
||||
{
|
||||
PlayMusicInternal(MusicEvent, true);
|
||||
}
|
||||
|
||||
private void PlayMusicInternal(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;
|
||||
}
|
||||
|
||||
_MusicPlayer.loop = Loop;
|
||||
|
||||
if (_MusicPlayer.clip != null)
|
||||
_MusicPlayer.Play();
|
||||
}
|
||||
|
||||
|
||||
[NetworkCallable]
|
||||
public void PlaySFX(SFXEventType SFXEvent)
|
||||
{
|
||||
PlaySFXInternal(SFXEvent);
|
||||
}
|
||||
[NetworkCallable]
|
||||
public void PlaySFXAtPitch(SFXEventType SFXEvent, float Pitch)
|
||||
{
|
||||
PlaySFXInternal(SFXEvent, Pitch);
|
||||
}
|
||||
|
||||
private void PlaySFXInternal(SFXEventType SFXEvent, float Pitch = 1.0f)
|
||||
{
|
||||
_SFXPlayer.Stop();
|
||||
|
||||
switch (SFXEvent)
|
||||
{
|
||||
case SFXEventType.Ding: _SFXPlayer.clip = _Ding; break;
|
||||
case SFXEventType.Buzzer: _SFXPlayer.clip = _Buzzer; break;
|
||||
default: _SFXPlayer.clip = null; break;
|
||||
}
|
||||
|
||||
if (_SFXPlayer.clip != null)
|
||||
_SFXPlayer.pitch = Pitch;
|
||||
_SFXPlayer.Play();
|
||||
}
|
||||
|
||||
// A messy group of variables that are used for pitch correction of sound effects
|
||||
// Since Udon doesn't support accessing public static values in structs, we're doing it here
|
||||
// As5 = 932.33 Hz, PitchShift = TargetNoteFreq / As5Freq
|
||||
public const float As4 = 0.49999463709201677517617152724894f;
|
||||
public const float B4 = 0.52972659895101519848122445915073f;
|
||||
public const float C5 = 0.56122832044447781364967339890382f;
|
||||
public const float Cs5 = 0.5946070597320691171580878015295f;
|
||||
public const float D5 = 0.62995934915748715583538017654693f;
|
||||
public const float Ds5 = 0.66741389851232932545343386998166f;
|
||||
public const float E5 = 0.70709941758819302178413222785923f;
|
||||
public const float F5 = 0.74915534199264209024701554170734f;
|
||||
public const float Fs5 = 0.79369965570130747696631021204938f;
|
||||
public const float G5 = 0.84089324595368592665687042141731f;
|
||||
public const float Gs5 = 0.89089699998927418403355035234305f;
|
||||
public const float A5 = 0.94387180504756899381120418735855f;
|
||||
public const float As5 = 1.0f;
|
||||
public const float B5 = 1.0594639237179968466101058638036f;
|
||||
public const float C6 = 1.1224566408889556272993467978076f;
|
||||
public const float Cs6 = 1.1892033936481717846685186575569f;
|
||||
public const float D6 = 1.2599186983149743116707603530939f;
|
||||
public const float Ds6 = 1.3348385228406251005545246854654f;
|
||||
public const float E6 = 1.4142095609923524932159214012206f;
|
||||
public const float F6 = 1.4982999581693177308463741379125f;
|
||||
public const float Fs6 = 1.5873993114026149539326204240988f;
|
||||
public const float G6 = 1.6817864919073718533137408428346f;
|
||||
public const float Gs6 = 1.7817939999785483680671007046861f;
|
||||
public const float A6 = 1.8877436100951379876224083747171f;
|
||||
public const float As6 = 2.0f;
|
||||
public const float B6 = 2.1183486533738054122467366704922f;
|
||||
public const float C7 = 2.2449132817779112545986935956153f;
|
||||
public const float Cs7 = 2.3784067872963435693370373151137f;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 518bff42d8b5f444a886ecc058f2c7c0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,239 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
||||
m_Name: CaseManager
|
||||
m_EditorClassIdentifier:
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: 62c9faef97d5dff4cb26942efb75716b,
|
||||
type: 2}
|
||||
udonAssembly:
|
||||
assemblyError:
|
||||
sourceCsScript: {fileID: 11500000, guid: 3b92bbb94b16747479ba7b1b7e17147a, type: 3}
|
||||
scriptVersion: 2
|
||||
compiledVersion: 2
|
||||
behaviourSyncMode: 4
|
||||
hasInteractEvent: 0
|
||||
scriptID: 2715855028356800412
|
||||
serializationData:
|
||||
SerializedFormat: 2
|
||||
SerializedBytes:
|
||||
ReferencedUnityObjects: []
|
||||
SerializedBytesString:
|
||||
Prefab: {fileID: 0}
|
||||
PrefabModificationsReferencedUnityObjects: []
|
||||
PrefabModifications: []
|
||||
SerializationNodes:
|
||||
- Name: fieldDefinitions
|
||||
Entry: 7
|
||||
Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[UdonSharp.Compiler.FieldDefinition,
|
||||
UdonSharp.Editor]], mscorlib
|
||||
- Name: comparer
|
||||
Entry: 7
|
||||
Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String,
|
||||
mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 3
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _QuestionURL
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _QuestionURL
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 3|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: VRC.SDKBase.VRCUrl, VRCSDKBase
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 3
|
||||
- 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: 4|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 5|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: _Round1Manager
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 6|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _Round1Manager
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 7|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: GameManagerRound1, Assembly-CSharp
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 8|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: VRC.Udon.UdonBehaviour, VRC.Udon
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- 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: 9|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 10|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: _Round2Manager
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 11|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _Round2Manager
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 12|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: GameManagerRound2, Assembly-CSharp
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 8
|
||||
- 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: 13|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 14|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:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 338dec508e6993f499443ebae40dedfa
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,98 @@
|
||||
|
||||
using UdonSharp;
|
||||
using UnityEngine;
|
||||
using VRC.SDK3.Data;
|
||||
using VRC.SDK3.StringLoading;
|
||||
using VRC.SDKBase;
|
||||
using VRC.Udon;
|
||||
using VRC.Udon.Common.Interfaces;
|
||||
|
||||
|
||||
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
|
||||
public class CaseManager : UdonSharpBehaviour
|
||||
{
|
||||
[SerializeField] protected VRCUrl _QuestionURL;
|
||||
|
||||
[SerializeField] private GameManagerRound1 _Round1Manager;
|
||||
[SerializeField] private GameManagerRound2 _Round2Manager;
|
||||
//[SerializeField] private GameManagerRound3 _Round3Manager;
|
||||
|
||||
|
||||
void Start()
|
||||
{
|
||||
// Download our test question.
|
||||
VRCStringDownloader.LoadUrl(_QuestionURL, (IUdonEventReceiver)this);
|
||||
}
|
||||
|
||||
|
||||
public override void OnStringLoadSuccess(IVRCStringDownload DownloadedString)
|
||||
{
|
||||
string ErrorString = "";
|
||||
string JSONString = DownloadedString.Result;
|
||||
if (VRCJson.TryDeserializeFromJson(JSONString, out DataToken JSONResult))
|
||||
{
|
||||
if (JSONResult.TokenType == TokenType.DataDictionary)
|
||||
{
|
||||
DataDictionary Dict = JSONResult.DataDictionary;
|
||||
|
||||
if (!Dict.ContainsKey("Round 1") || !Dict.ContainsKey("Round 2")/* || !Dict.ContainsKey("Round 3")*/)
|
||||
{
|
||||
ErrorString = "Could not find all the necessary keys for game rounds.";
|
||||
}
|
||||
else
|
||||
{
|
||||
// Attempt to load Round 1 data
|
||||
if (Dict["Round 1"].TokenType == TokenType.DataList)
|
||||
{
|
||||
_Round1Manager.LoadQuestionData(Dict["Round 1"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorString = "Ensure the 'Round 1' entry is an array of dictionaries.";
|
||||
}
|
||||
|
||||
// Attempt to load Round 2 data
|
||||
if (Dict["Round 2"].TokenType == TokenType.DataDictionary)
|
||||
{
|
||||
_Round2Manager.LoadQuestionData(Dict["Round 2"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorString = "Ensure the 'Round 2' entry is a dictionary with a location name and a list of landmarks.";
|
||||
}
|
||||
|
||||
//// Attempt to load Round 3 data
|
||||
//if (Dict["Round 3"].TokenType == TokenType.DataList)
|
||||
//{
|
||||
// LoadQuestionData(Dict["Round 3"].DataList);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// ErrorString = "Ensure the 'Round 3' dictionary entry is a list of dictionaries.";
|
||||
//}
|
||||
}
|
||||
|
||||
if (Dict.ContainsKey("Round 1"))
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorString = "Ensure the first element is a dictionary, containing 'Round 1', 'Round 2', and 'Round 3' entries.";
|
||||
}
|
||||
|
||||
if (Dict.ContainsKey("Round 2"))
|
||||
{
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorString = "Ensure the first element is a dictionary";
|
||||
}
|
||||
}
|
||||
|
||||
if (ErrorString != "")
|
||||
{
|
||||
Debug.LogError("Malformed case file. " + ErrorString);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3b92bbb94b16747479ba7b1b7e17147a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,335 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
||||
m_Name: CaseManagerListEntry
|
||||
m_EditorClassIdentifier:
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: 2240fb6ca7b75564cb595ed95626b100,
|
||||
type: 2}
|
||||
udonAssembly:
|
||||
assemblyError:
|
||||
sourceCsScript: {fileID: 11500000, guid: de0b68ff29d8b9a41a331db886722bed, type: 3}
|
||||
scriptVersion: 2
|
||||
compiledVersion: 2
|
||||
behaviourSyncMode: 0
|
||||
hasInteractEvent: 0
|
||||
scriptID: -8334234479216283669
|
||||
serializationData:
|
||||
SerializedFormat: 2
|
||||
SerializedBytes:
|
||||
ReferencedUnityObjects: []
|
||||
SerializedBytesString:
|
||||
Prefab: {fileID: 0}
|
||||
PrefabModificationsReferencedUnityObjects: []
|
||||
PrefabModifications: []
|
||||
SerializationNodes:
|
||||
- Name: fieldDefinitions
|
||||
Entry: 7
|
||||
Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[UdonSharp.Compiler.FieldDefinition,
|
||||
UdonSharp.Editor]], mscorlib
|
||||
- Name: comparer
|
||||
Entry: 7
|
||||
Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String,
|
||||
mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 5
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _CaseFileURL
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _CaseFileURL
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 3|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: VRC.SDKBase.VRCUrl, VRCSDKBase
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 3
|
||||
- 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: 4|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 5|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: _CaseNameText
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 6|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _CaseNameText
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 7|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: TMPro.TextMeshProUGUI, Unity.TextMeshPro
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 7
|
||||
- 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: 8|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 9|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: _CrookNameText
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 10|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _CrookNameText
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 7
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 7
|
||||
- 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: 11|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 12|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: _StolenLootText
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 13|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _StolenLootText
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 7
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 7
|
||||
- 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: 14|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 15|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: _DeserialisedData
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 16|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _DeserialisedData
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 17|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: VRC.SDK3.Data.DataDictionary, VRCSDK3
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 17
|
||||
- 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: 18|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: 13
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6eb02c8d09c27f945b43ed852bff57f4
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,61 @@
|
||||
|
||||
using TMPro;
|
||||
using UdonSharp;
|
||||
using UnityEngine;
|
||||
using VRC.SDK3.Data;
|
||||
using VRC.SDK3.Image;
|
||||
using VRC.SDK3.StringLoading;
|
||||
using VRC.SDKBase;
|
||||
using VRC.Udon;
|
||||
using VRC.Udon.Common.Interfaces;
|
||||
|
||||
public class CaseManagerListEntry : UdonSharpBehaviour
|
||||
{
|
||||
[SerializeField] private VRCUrl _CaseFileURL;
|
||||
|
||||
[SerializeField] private TextMeshProUGUI _CaseNameText;
|
||||
[SerializeField] private TextMeshProUGUI _CrookNameText;
|
||||
[SerializeField] private TextMeshProUGUI _StolenLootText;
|
||||
|
||||
private DataDictionary _DeserialisedData;
|
||||
|
||||
|
||||
private void Start()
|
||||
{
|
||||
//VRCStringDownloader.LoadUrl(_CaseFileURL, (IUdonEventReceiver)this);
|
||||
}
|
||||
|
||||
public override void OnStringLoadSuccess(IVRCStringDownload DownloadedString)
|
||||
{
|
||||
string ErrorString = "";
|
||||
string JSONString = DownloadedString.Result;
|
||||
if (VRCJson.TryDeserializeFromJson(JSONString, out DataToken JSONResult))
|
||||
{
|
||||
if (JSONResult.TokenType == TokenType.DataDictionary)
|
||||
{
|
||||
_DeserialisedData = JSONResult.DataDictionary;
|
||||
if (_DeserialisedData.ContainsKey("Case Title") &&
|
||||
_DeserialisedData.ContainsKey("Accused Crook") &&
|
||||
_DeserialisedData.ContainsKey("Stolen Loot"))
|
||||
{
|
||||
_CaseNameText.text = _DeserialisedData["Case Title"].ToString();
|
||||
_CrookNameText.text = _DeserialisedData["Accused Crook"].ToString();
|
||||
_StolenLootText.text = _DeserialisedData["Stolen Loot"].ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorString = "Metadata is missing.";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorString = "Ensure the first element is a dictionary";
|
||||
}
|
||||
}
|
||||
|
||||
if (ErrorString != "")
|
||||
{
|
||||
Debug.LogError("Malformed case file: " + _CaseFileURL.Get() + ". " + ErrorString);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: de0b68ff29d8b9a41a331db886722bed
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,53 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
||||
m_Name: CaseManagerListView
|
||||
m_EditorClassIdentifier:
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: ae5f5a19ce750064b833b9437cc22fd1,
|
||||
type: 2}
|
||||
udonAssembly:
|
||||
assemblyError:
|
||||
sourceCsScript: {fileID: 11500000, guid: f38cf90ccd33f09438a92fd9cce1e8be, type: 3}
|
||||
scriptVersion: 2
|
||||
compiledVersion: 2
|
||||
behaviourSyncMode: 4
|
||||
hasInteractEvent: 0
|
||||
scriptID: -4592037974035758144
|
||||
serializationData:
|
||||
SerializedFormat: 2
|
||||
SerializedBytes:
|
||||
ReferencedUnityObjects: []
|
||||
SerializedBytesString:
|
||||
Prefab: {fileID: 0}
|
||||
PrefabModificationsReferencedUnityObjects: []
|
||||
PrefabModifications: []
|
||||
SerializationNodes:
|
||||
- Name: fieldDefinitions
|
||||
Entry: 7
|
||||
Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[UdonSharp.Compiler.FieldDefinition,
|
||||
UdonSharp.Editor]], mscorlib
|
||||
- Name: comparer
|
||||
Entry: 7
|
||||
Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String,
|
||||
mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
- Name:
|
||||
Entry: 13
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 732733f26dccf184f90ac2f5ff40affd
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,61 @@
|
||||
|
||||
using UdonSharp;
|
||||
using UnityEngine;
|
||||
using VRC.Core.Pool;
|
||||
using VRC.SDK3.Data;
|
||||
using VRC.SDKBase;
|
||||
using VRC.Udon;
|
||||
|
||||
|
||||
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
|
||||
public class CaseManagerListView : UdonSharpBehaviour
|
||||
{
|
||||
//[SerializeField] private RectTransform _ListContainer;
|
||||
|
||||
//[SerializeField] private GameObject _CaseListViewEntryTemplate;
|
||||
|
||||
//private DataDictionary PlayerData = new DataDictionary();
|
||||
|
||||
|
||||
//public override void OnPlayerJoined(VRCPlayerApi Player)
|
||||
//{
|
||||
// GameObject NewListItem = Instantiate<GameObject>(_CaseListViewEntryTemplate, _ListContainer, false);
|
||||
// NewListItem.SetActive(true);
|
||||
// PermissionsPanelPlayerEntry PlayerListItem = NewListItem.GetComponent<PermissionsPanelPlayerEntry>();
|
||||
// PlayerListItem.PlayerNameUI.text = Player.displayName;
|
||||
|
||||
// PlayerData[Player.displayName] = new DataDictionary();
|
||||
// PlayerData[Player.displayName].DataDictionary["Admin"] = Player.isInstanceOwner;
|
||||
// PlayerData[Player.displayName].DataDictionary["Host"] = Player.isInstanceOwner;
|
||||
// PlayerData[Player.displayName].DataDictionary["Camera"] = Player.isInstanceOwner;
|
||||
|
||||
// if (Networking.LocalPlayer.isInstanceOwner)
|
||||
// {
|
||||
// PlayerListItem.AdminToggle.interactable = true;
|
||||
// PlayerListItem.HostToggle.interactable = true;
|
||||
// PlayerListItem.CameraToggle.interactable = true;
|
||||
|
||||
// PlayerListItem.AdminToggle.SetIsOnWithoutNotify(true);
|
||||
// PlayerListItem.HostToggle.SetIsOnWithoutNotify(true);
|
||||
// PlayerListItem.CameraToggle.SetIsOnWithoutNotify(true);
|
||||
// }
|
||||
|
||||
// base.OnPlayerJoined(Player);
|
||||
//}
|
||||
|
||||
//public override void OnPlayerLeft(VRCPlayerApi player)
|
||||
//{
|
||||
// for (int i = 0; i < _ListContainer.childCount; i++)
|
||||
// {
|
||||
// GameObject Entry = _ListContainer.GetChild(i).gameObject;
|
||||
// PermissionsPanelPlayerEntry PlayerEntry = Entry.GetComponent<PermissionsPanelPlayerEntry>();
|
||||
// if (PlayerEntry != null && PlayerEntry.PlayerNameUI.text == player.displayName)
|
||||
// {
|
||||
// Destroy(Entry);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
// base.OnPlayerLeft(player);
|
||||
//}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f38cf90ccd33f09438a92fd9cce1e8be
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -50,52 +50,46 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _HostCard
|
||||
Data: _GameHasBegun
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _HostCard
|
||||
Data: _GameHasBegun
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 3|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: HostCardManager, Assembly-CSharp
|
||||
Data: System.Boolean, mscorlib
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 4|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: VRC.Udon.UdonBehaviour, VRC.Udon
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
Entry: 9
|
||||
Data: 3
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
- Name:
|
||||
Entry: 6
|
||||
Data:
|
||||
Entry: 3
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <IsSerialized>k__BackingField
|
||||
Entry: 5
|
||||
Data: true
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 5|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 4|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 6|UnityEngine.SerializeField, UnityEngine.CoreModule
|
||||
Data: 5|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
@@ -116,25 +110,31 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _QuestionURL
|
||||
Data: _HostCard
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 7|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 6|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _QuestionURL
|
||||
Data: _HostCard
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 8|System.RuntimeType, mscorlib
|
||||
Data: 7|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: VRC.SDKBase.VRCUrl, VRCSDKBase
|
||||
Data: HostCardManager, Assembly-CSharp
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 8
|
||||
Entry: 7
|
||||
Data: 8|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: VRC.Udon.UdonBehaviour, VRC.Udon
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -184,17 +184,11 @@ MonoBehaviour:
|
||||
Entry: 1
|
||||
Data: _AllowInteractionFromHostCard
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 12|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: System.Boolean, mscorlib
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
Entry: 9
|
||||
Data: 3
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 12
|
||||
Data: 3
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -209,7 +203,7 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 13|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 12|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
|
||||
@@ -10,6 +10,14 @@ using VRC.Udon.Common.Interfaces;
|
||||
using VRC.Udon.Serialization.OdinSerializer.Utilities;
|
||||
|
||||
|
||||
public enum GameType
|
||||
{
|
||||
None,
|
||||
LocateTheCrook,
|
||||
RecoverTheLoot,
|
||||
ChaseCarmen
|
||||
}
|
||||
|
||||
public enum QuestionType
|
||||
{
|
||||
BetweenRounds,
|
||||
@@ -44,8 +52,6 @@ public class GameManagerBase : UdonSharpBehaviour
|
||||
|
||||
[SerializeField] protected HostCardManager _HostCard = null;
|
||||
|
||||
[SerializeField] protected VRCUrl _QuestionURL;
|
||||
|
||||
private bool _AllowInteractionFromHostCard = false;
|
||||
|
||||
|
||||
@@ -76,9 +82,10 @@ public class GameManagerBase : UdonSharpBehaviour
|
||||
_HostCardUseButtonDown_Internal();
|
||||
}
|
||||
|
||||
protected HostCardInterfaceBase GetHostCardInterface(QuestionType Type)
|
||||
protected virtual HostCardInterfaceBase GetHostCardInterface(QuestionType Question)
|
||||
{
|
||||
return _HostCard.EnableHostCardDisplay(Type);
|
||||
Debug.LogError("You should not be seeing this. You don't need to run base.GetHostCardInterface()");
|
||||
return _HostCard.EnableHostCardDisplay(GameType.None, Question);
|
||||
}
|
||||
|
||||
protected virtual void _HostCardUseButtonDown_Internal()
|
||||
@@ -87,83 +94,34 @@ public class GameManagerBase : UdonSharpBehaviour
|
||||
}
|
||||
|
||||
|
||||
protected virtual void InitialiseGameMode()
|
||||
protected virtual void InitialiseGameMode() { }
|
||||
|
||||
public virtual void LoadQuestionData(DataToken Data) { }
|
||||
|
||||
|
||||
protected string GameTypeToString(GameType Type)
|
||||
{
|
||||
// Download our test question.
|
||||
VRCStringDownloader.LoadUrl(_QuestionURL, (IUdonEventReceiver)this);
|
||||
}
|
||||
|
||||
|
||||
public override void OnStringLoadSuccess(IVRCStringDownload DownloadedString)
|
||||
{
|
||||
string ErrorString = "";
|
||||
string JSONString = DownloadedString.Result;
|
||||
if (VRCJson.TryDeserializeFromJson(JSONString, out DataToken JSONResult))
|
||||
switch ((int)Type)
|
||||
{
|
||||
if (JSONResult.TokenType == TokenType.DataDictionary)
|
||||
{
|
||||
DataDictionary Dict = JSONResult.DataDictionary;
|
||||
|
||||
if (!Dict.ContainsKey("Round 1") || !Dict.ContainsKey("Round 2") || !Dict.ContainsKey("Round 3"))
|
||||
{
|
||||
ErrorString = "Could not find all the necessary keys for game rounds.";
|
||||
}
|
||||
else
|
||||
{
|
||||
// Attempt to load Round 1 data
|
||||
if (Dict["Round 1"].TokenType == TokenType.DataList)
|
||||
{
|
||||
LoadQuestionData(Dict["Round 1"].DataList);
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorString = "Ensure the 'Round 1' entry is an array of dictionaries.";
|
||||
}
|
||||
|
||||
// Attempt to load Round 2 data
|
||||
if (Dict["Round 2"].TokenType == TokenType.DataList)
|
||||
{
|
||||
// LoadQuestionData(Dict["Round 2"].DataList);
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorString = "Ensure the 'Round 2' entry is a dictionary with a location name and landmarks.";
|
||||
}
|
||||
|
||||
// Attempt to load Round 2 data
|
||||
if (Dict["Round 3"].TokenType == TokenType.DataList)
|
||||
{
|
||||
// LoadQuestionData(Dict["Round 3"].DataList);
|
||||
}
|
||||
else
|
||||
{
|
||||
// ErrorString = "Ensure the 'Round 3' dictionary entry is a list of dictionaries.";
|
||||
}
|
||||
}
|
||||
|
||||
if (Dict.ContainsKey("Round 1"))
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorString = "Ensure the first element is a dictionary, containing 'Round 1', 'Round 2', and 'Round 3' entries.";
|
||||
}
|
||||
|
||||
if (Dict.ContainsKey("Round 2"))
|
||||
{
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorString = "Ensure the first element is a dictionary";
|
||||
}
|
||||
}
|
||||
|
||||
if (ErrorString != "")
|
||||
{
|
||||
Debug.LogError("Malformed case file. " + ErrorString);
|
||||
case (int)GameType.LocateTheCrook: return "Locate The Crook";
|
||||
case (int)GameType.RecoverTheLoot: return "Recover The Loot";
|
||||
case (int)GameType.ChaseCarmen: return "Chase Carmen";
|
||||
default: return "[[ERROR]]";
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void LoadQuestionData(DataList Data) {}
|
||||
protected string QuestionTypeToString(QuestionType Type)
|
||||
{
|
||||
switch ((int)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";
|
||||
default: return "[[ERROR]]";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -24,17 +24,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
|
||||
[SerializeField] private PlayerPodium[] _PlayerPodiums;
|
||||
|
||||
[Header("Audio")]
|
||||
[SerializeField] private AudioClip _Ding = null;
|
||||
[SerializeField] private AudioClip _Buzzer = null;
|
||||
|
||||
[SerializeField] private AudioClip _TheChase = null;
|
||||
[SerializeField] private AudioClip _ThinkAboutIt = null;
|
||||
[SerializeField] private AudioClip _WhereInTheWorld = null;
|
||||
[SerializeField] private AudioClip _RockapellaIdent = null;
|
||||
|
||||
[SerializeField] private AudioSource _MusicPlayer = null;
|
||||
[SerializeField] private AudioSource _SFXPlayer = null;
|
||||
[SerializeField] private AudioManager _AudioManager;
|
||||
|
||||
|
||||
protected override void InitialiseGameMode()
|
||||
@@ -46,7 +36,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
}
|
||||
|
||||
|
||||
protected override void LoadQuestionData(DataList Data)
|
||||
public override void LoadQuestionData(DataToken Data)
|
||||
{
|
||||
_QuestionsList.Clear();
|
||||
_QuestionIndex = 0;
|
||||
@@ -54,11 +44,12 @@ public class GameManagerRound1 : GameManagerBase
|
||||
HostCardBetweenRoundsInterface Interface =
|
||||
(HostCardBetweenRoundsInterface)GetHostCardInterface(QuestionType.BetweenRounds);
|
||||
|
||||
for (int i = 0; i < Data.Count; i++)
|
||||
DataList DataDict = Data.DataList;
|
||||
for (int i = 0; i < DataDict.Count; i++)
|
||||
{
|
||||
if (Data[i].TokenType == TokenType.DataDictionary)
|
||||
if (DataDict[i].TokenType == TokenType.DataDictionary)
|
||||
{
|
||||
_QuestionsList.Add(Data[i]);
|
||||
_QuestionsList.Add(DataDict[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +118,8 @@ public class GameManagerRound1 : GameManagerBase
|
||||
|
||||
Interface.ChoiceButtonImages[0].color = (_QuestionCorrectResponse == 1) ? Color.green : Color.red;
|
||||
|
||||
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(PlaySFXAtPitch), SFXEventType.Ding, As5);
|
||||
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_AudioManager, NetworkEventTarget.All,
|
||||
"PlaySFXAtPitch", SFXEventType.Ding, AudioManager.As5);
|
||||
|
||||
EnableInteraction("Reveal Choice 2");
|
||||
}
|
||||
@@ -138,7 +130,8 @@ public class GameManagerRound1 : GameManagerBase
|
||||
|
||||
Interface.ChoiceButtonImages[1].color = (_QuestionCorrectResponse == 2) ? Color.green : Color.red;
|
||||
|
||||
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(PlaySFXAtPitch), SFXEventType.Ding, C6);
|
||||
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_AudioManager, NetworkEventTarget.All,
|
||||
"PlaySFXAtPitch", SFXEventType.Ding, AudioManager.C6);
|
||||
|
||||
EnableInteraction("Reveal Choice 3");
|
||||
}
|
||||
@@ -176,7 +169,8 @@ public class GameManagerRound1 : GameManagerBase
|
||||
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_PlayerPodiums[i], NetworkEventTarget.All, "SetCardChoices", ChoiceStrings, ChoiceOrder);
|
||||
}
|
||||
|
||||
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(PlaySFXAtPitch), SFXEventType.Ding, D6);
|
||||
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_AudioManager, NetworkEventTarget.All,
|
||||
"PlaySFXAtPitch", SFXEventType.Ding, AudioManager.D6);
|
||||
|
||||
EnableInteraction("Lock Answers");
|
||||
}
|
||||
@@ -342,7 +336,8 @@ public class GameManagerRound1 : GameManagerBase
|
||||
HostCardTheChaseInterface Interface =
|
||||
(HostCardTheChaseInterface)GetHostCardInterface(QuestionType.TheChase);
|
||||
|
||||
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)this, NetworkEventTarget.All, nameof(PlayMusic), MusicEventType.TheChase);
|
||||
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_AudioManager, NetworkEventTarget.All,
|
||||
"PlayMusic", MusicEventType.TheChase);
|
||||
|
||||
Interface.HeaderUI.text = QuestionTypeToString(QuestionType.TheChase);
|
||||
Interface.ClueUI.text = "All of these questions are worth 5 Acme Crimebucks. Hands on your buzzers. Listen carefully. Here we go.";
|
||||
@@ -459,7 +454,8 @@ public class GameManagerRound1 : GameManagerBase
|
||||
(HostCardBetweenRoundsInterface)GetHostCardInterface(QuestionType.BetweenRounds);
|
||||
Interface.HeaderUI.text = "Think about it...";
|
||||
|
||||
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)this, NetworkEventTarget.All, nameof(PlayMusic), MusicEventType.ThinkAboutIt);
|
||||
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_AudioManager, NetworkEventTarget.All,
|
||||
"PlayMusic", MusicEventType.ThinkAboutIt);
|
||||
SendCustomEventDelayedSeconds(nameof(ThinkAboutItCountdownFinished), 15.0f);
|
||||
}
|
||||
public void ThinkAboutItCountdownFinished()
|
||||
@@ -486,7 +482,8 @@ public class GameManagerRound1 : GameManagerBase
|
||||
(HostCardFinalRoundInterface)GetHostCardInterface(QuestionType.FinalRound);
|
||||
Interface.ChoiceButtonImages[0].color = (_QuestionCorrectResponse == 1) ? Color.green : Color.red;
|
||||
|
||||
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(PlaySFXAtPitch), SFXEventType.Ding, As5);
|
||||
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_AudioManager, NetworkEventTarget.All,
|
||||
"PlaySFXAtPitch", SFXEventType.Ding, AudioManager.As5);
|
||||
|
||||
EnableInteraction("Reveal Choice 2");
|
||||
}
|
||||
@@ -496,7 +493,8 @@ public class GameManagerRound1 : GameManagerBase
|
||||
(HostCardFinalRoundInterface)GetHostCardInterface(QuestionType.FinalRound);
|
||||
Interface.ChoiceButtonImages[1].color = (_QuestionCorrectResponse == 2) ? Color.green : Color.red;
|
||||
|
||||
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(PlaySFXAtPitch), SFXEventType.Ding, C6);
|
||||
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_AudioManager, NetworkEventTarget.All,
|
||||
"PlaySFXAtPitch", SFXEventType.Ding, AudioManager.C6);
|
||||
|
||||
EnableInteraction("Reveal Choice 3");
|
||||
}
|
||||
@@ -534,7 +532,8 @@ public class GameManagerRound1 : GameManagerBase
|
||||
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_PlayerPodiums[i], NetworkEventTarget.All, "SetCardChoices", ChoiceStrings, ChoiceOrder);
|
||||
}
|
||||
|
||||
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(PlaySFXAtPitch), SFXEventType.Ding, D6);
|
||||
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_AudioManager, NetworkEventTarget.All,
|
||||
"PlaySFXAtPitch", SFXEventType.Ding, AudioManager.D6);
|
||||
|
||||
EnableInteraction("Lock Answers");
|
||||
}
|
||||
@@ -809,7 +808,8 @@ public class GameManagerRound1 : GameManagerBase
|
||||
"EnableBuzzInEffect", true);
|
||||
|
||||
// Play the buzzer sound globally.
|
||||
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(PlaySFX), SFXEventType.Buzzer);
|
||||
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_AudioManager, NetworkEventTarget.All,
|
||||
"PlaySFX", SFXEventType.Buzzer);
|
||||
}
|
||||
|
||||
private void EndBuzzInPeriod()
|
||||
@@ -918,66 +918,6 @@ public class GameManagerRound1 : GameManagerBase
|
||||
}
|
||||
|
||||
|
||||
[NetworkCallable]
|
||||
public void PlayMusic(MusicEventType MusicEvent)
|
||||
{
|
||||
PlayMusicInternal(MusicEvent, false);
|
||||
}
|
||||
|
||||
[NetworkCallable]
|
||||
public void PlayMusicLoop(MusicEventType MusicEvent)
|
||||
{
|
||||
PlayMusicInternal(MusicEvent, true);
|
||||
}
|
||||
|
||||
private void PlayMusicInternal(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;
|
||||
}
|
||||
|
||||
_MusicPlayer.loop = Loop;
|
||||
|
||||
if (_MusicPlayer.clip != null)
|
||||
_MusicPlayer.Play();
|
||||
}
|
||||
|
||||
|
||||
[NetworkCallable]
|
||||
public void PlaySFX(SFXEventType SFXEvent)
|
||||
{
|
||||
PlaySFXInternal(SFXEvent);
|
||||
}
|
||||
[NetworkCallable]
|
||||
public void PlaySFXAtPitch(SFXEventType SFXEvent, float Pitch)
|
||||
{
|
||||
PlaySFXInternal(SFXEvent, Pitch);
|
||||
}
|
||||
|
||||
private void PlaySFXInternal(SFXEventType SFXEvent, float Pitch = 1.0f)
|
||||
{
|
||||
_SFXPlayer.Stop();
|
||||
|
||||
switch (SFXEvent)
|
||||
{
|
||||
case SFXEventType.Ding: _SFXPlayer.clip = _Ding; break;
|
||||
case SFXEventType.Buzzer: _SFXPlayer.clip = _Buzzer; break;
|
||||
default: _SFXPlayer.clip = null; break;
|
||||
}
|
||||
|
||||
if (_SFXPlayer.clip != null)
|
||||
_SFXPlayer.pitch = Pitch;
|
||||
_SFXPlayer.Play();
|
||||
}
|
||||
|
||||
|
||||
protected override void _HostCardUseButtonDown_Internal()
|
||||
{
|
||||
if (!_GameHasBegun)
|
||||
@@ -990,7 +930,8 @@ public class GameManagerRound1 : GameManagerBase
|
||||
"DisplayScore");
|
||||
}
|
||||
|
||||
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(PlaySFXAtPitch), SFXEventType.Ding, D6);
|
||||
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_AudioManager, NetworkEventTarget.All,
|
||||
"PlaySFXAtPitch", SFXEventType.Ding, AudioManager.D6);
|
||||
|
||||
HostCardBetweenRoundsInterface Interface =
|
||||
(HostCardBetweenRoundsInterface)GetHostCardInterface(QuestionType.BetweenRounds);
|
||||
@@ -1003,52 +944,8 @@ public class GameManagerRound1 : GameManagerBase
|
||||
AdvanceQuestion();
|
||||
}
|
||||
|
||||
|
||||
private string QuestionTypeToString(QuestionType Type)
|
||||
protected override HostCardInterfaceBase GetHostCardInterface(QuestionType Question)
|
||||
{
|
||||
switch((int)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";
|
||||
default: return "[[ERROR]]";
|
||||
}
|
||||
return _HostCard.EnableHostCardDisplay(GameType.LocateTheCrook, Question);
|
||||
}
|
||||
|
||||
|
||||
// A messy group of variables that are used for pitch correction of sound effects
|
||||
// Since Udon doesn't support accessing public static values in structs, we're doing it here
|
||||
// As5 = 932.33 Hz, PitchShift = TargetNoteFreq / As5Freq
|
||||
private const float As4 = 0.49999463709201677517617152724894f;
|
||||
private const float B4 = 0.52972659895101519848122445915073f;
|
||||
private const float C5 = 0.56122832044447781364967339890382f;
|
||||
private const float Cs5 = 0.5946070597320691171580878015295f;
|
||||
private const float D5 = 0.62995934915748715583538017654693f;
|
||||
private const float Ds5 = 0.66741389851232932545343386998166f;
|
||||
private const float E5 = 0.70709941758819302178413222785923f;
|
||||
private const float F5 = 0.74915534199264209024701554170734f;
|
||||
private const float Fs5 = 0.79369965570130747696631021204938f;
|
||||
private const float G5 = 0.84089324595368592665687042141731f;
|
||||
private const float Gs5 = 0.89089699998927418403355035234305f;
|
||||
private const float A5 = 0.94387180504756899381120418735855f;
|
||||
private const float As5 = 1.0f;
|
||||
private const float B5 = 1.0594639237179968466101058638036f;
|
||||
private const float C6 = 1.1224566408889556272993467978076f;
|
||||
private const float Cs6 = 1.1892033936481717846685186575569f;
|
||||
private const float D6 = 1.2599186983149743116707603530939f;
|
||||
private const float Ds6 = 1.3348385228406251005545246854654f;
|
||||
private const float E6 = 1.4142095609923524932159214012206f;
|
||||
private const float F6 = 1.4982999581693177308463741379125f;
|
||||
private const float Fs6 = 1.5873993114026149539326204240988f;
|
||||
private const float G6 = 1.6817864919073718533137408428346f;
|
||||
private const float Gs6 = 1.7817939999785483680671007046861f;
|
||||
private const float A6 = 1.8877436100951379876224083747171f;
|
||||
private const float As6 = 2.0f;
|
||||
private const float B6 = 2.1183486533738054122467366704922f;
|
||||
private const float C7 = 2.2449132817779112545986935956153f;
|
||||
private const float Cs7 = 2.3784067872963435693370373151137f;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,287 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
||||
m_Name: GameManagerRound2
|
||||
m_EditorClassIdentifier:
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: fb4f2fa1ac6a4e84ca7ea3651da9f23d,
|
||||
type: 2}
|
||||
udonAssembly:
|
||||
assemblyError:
|
||||
sourceCsScript: {fileID: 11500000, guid: aff7dcb877dc27a4ab2fd77cf366a3b8, type: 3}
|
||||
scriptVersion: 2
|
||||
compiledVersion: 2
|
||||
behaviourSyncMode: 4
|
||||
hasInteractEvent: 0
|
||||
scriptID: 5296841872405063526
|
||||
serializationData:
|
||||
SerializedFormat: 2
|
||||
SerializedBytes:
|
||||
ReferencedUnityObjects: []
|
||||
SerializedBytesString:
|
||||
Prefab: {fileID: 0}
|
||||
PrefabModificationsReferencedUnityObjects: []
|
||||
PrefabModifications: []
|
||||
SerializationNodes:
|
||||
- Name: fieldDefinitions
|
||||
Entry: 7
|
||||
Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[UdonSharp.Compiler.FieldDefinition,
|
||||
UdonSharp.Editor]], mscorlib
|
||||
- Name: comparer
|
||||
Entry: 7
|
||||
Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String,
|
||||
mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 4
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _GameHasBegun
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _GameHasBegun
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 3|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: System.Boolean, mscorlib
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 3
|
||||
- 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: 4|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 5|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: _HostCard
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 6|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _HostCard
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 7|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: HostCardManager, Assembly-CSharp
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 8|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: VRC.Udon.UdonBehaviour, VRC.Udon
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- 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: 9|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 10|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: _AllowInteractionFromHostCard
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 11|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _AllowInteractionFromHostCard
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 3
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 3
|
||||
- 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: 12|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: _LocationBoard
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 13|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _LocationBoard
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 14|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: LocationBoard, Assembly-CSharp
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 8
|
||||
- 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: 15|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 16|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:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 01b26530c70f89f458636bd161a66124
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
using UdonSharp;
|
||||
using UnityEngine;
|
||||
using VRC.SDK3.Data;
|
||||
@@ -10,6 +10,8 @@ using VRC.SDKBase;
|
||||
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
|
||||
public class GameManagerRound2 : GameManagerBase
|
||||
{
|
||||
[SerializeField] private LocationBoard _LocationBoard;
|
||||
|
||||
protected override void InitialiseGameMode()
|
||||
{
|
||||
|
||||
@@ -18,70 +20,80 @@ public class GameManagerRound2 : GameManagerBase
|
||||
}
|
||||
|
||||
|
||||
protected override void LoadQuestionData(DataList Data)
|
||||
public override void LoadQuestionData(DataToken Data)
|
||||
{
|
||||
_QuestionsList.Clear();
|
||||
_QuestionIndex = 0;
|
||||
|
||||
HostCardBetweenRoundsInterface Interface =
|
||||
(HostCardBetweenRoundsInterface)GetHostCardInterface(QuestionType.BetweenRounds);
|
||||
|
||||
for (int i = 0; i < Data.Count; i++)
|
||||
DataDictionary DataDict = Data.DataDictionary;
|
||||
|
||||
if (DataDict.ContainsKey("Location") && DataDict.ContainsKey("Landmarks"))
|
||||
{
|
||||
if (Data[i].TokenType == TokenType.DataDictionary)
|
||||
if (DataDict["Landmarks"].TokenType == TokenType.DataList && DataDict["Landmarks"].DataList.Count >= 15)
|
||||
{
|
||||
_QuestionsList.Add(Data[i]);
|
||||
DataList Landmarks = DataDict["Landmarks"].DataList;
|
||||
for (int i = 0; i < Landmarks.Count; i++)
|
||||
{
|
||||
if (Landmarks[i].TokenType == TokenType.DataDictionary)
|
||||
{
|
||||
DataDictionary LandmarkEntry = Landmarks[i].DataDictionary;
|
||||
if (LandmarkEntry.ContainsKey("Landmark"))
|
||||
{
|
||||
_LocationBoard.LocationPanelText[i].text = LandmarkEntry["Landmark"].ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("Malformed landmark entry. Ensure the 'Landmark' key exists.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("Malformed landmark entry. Ensure each landmark is a dictionary containing a 'Landmark' key.");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("Malformed landmark data. Ensure there is a list of at least 15 landmarks.");
|
||||
}
|
||||
}
|
||||
|
||||
if (_QuestionsList.Count == 0)
|
||||
else
|
||||
{
|
||||
Interface.HeaderUI.text =
|
||||
"Unable to find any questions. Ensure the root array elements are all objects.";
|
||||
return;
|
||||
Debug.LogError("Malformed round data. Ensure Round 2 contains 'Location' and 'Landmark' keys.");
|
||||
}
|
||||
|
||||
_CurrentQuestion = _QuestionsList[_QuestionIndex].DataDictionary;
|
||||
//_GameHasBegun = false;
|
||||
//EnableInteraction("Start Game");
|
||||
}
|
||||
|
||||
Interface.HeaderUI.text =
|
||||
"Found " + _QuestionsList.Count + " questions in this case file. Press 'Use' button to show scores.";
|
||||
|
||||
// Reset podiums on a successful case load
|
||||
for (int i = 0; i < _PlayerPodiums.Length; i++)
|
||||
{
|
||||
NetworkCalling.SendCustomNetworkEvent(
|
||||
(IUdonEventReceiver)_PlayerPodiums[i],
|
||||
NetworkEventTarget.All,
|
||||
"ResetPodium");
|
||||
}
|
||||
|
||||
_GameHasBegun = false;
|
||||
EnableInteraction("Start Game");
|
||||
protected override HostCardInterfaceBase GetHostCardInterface(QuestionType Question)
|
||||
{
|
||||
return _HostCard.EnableHostCardDisplay(GameType.RecoverTheLoot, Question);
|
||||
}
|
||||
|
||||
|
||||
protected override void _HostCardUseButtonDown_Internal()
|
||||
{
|
||||
if (!_GameHasBegun)
|
||||
{
|
||||
for (int i = 0; i < _PlayerPodiums.Length; i++)
|
||||
{
|
||||
NetworkCalling.SendCustomNetworkEvent(
|
||||
(IUdonEventReceiver)_PlayerPodiums[i],
|
||||
NetworkEventTarget.All,
|
||||
"DisplayScore");
|
||||
}
|
||||
//if (!_GameHasBegun)
|
||||
//{
|
||||
// for (int i = 0; i < _PlayerPodiums.Length; i++)
|
||||
// {
|
||||
// NetworkCalling.SendCustomNetworkEvent(
|
||||
// (IUdonEventReceiver)_PlayerPodiums[i],
|
||||
// NetworkEventTarget.All,
|
||||
// "DisplayScore");
|
||||
// }
|
||||
|
||||
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(PlaySFXAtPitch), SFXEventType.Ding, D6);
|
||||
// SendCustomNetworkEvent(NetworkEventTarget.All, nameof(PlaySFXAtPitch), SFXEventType.Ding, D6);
|
||||
|
||||
HostCardBetweenRoundsInterface Interface =
|
||||
(HostCardBetweenRoundsInterface)GetHostCardInterface(QuestionType.BetweenRounds);
|
||||
Interface.HeaderUI.text = "Upcoming Question: " + QuestionTypeToString((QuestionType)((int)_CurrentQuestion["Type"].Number));
|
||||
// HostCardBetweenRoundsInterface Interface =
|
||||
// (HostCardBetweenRoundsInterface)GetHostCardInterface(QuestionType.BetweenRounds);
|
||||
// Interface.HeaderUI.text = "Upcoming Question: " + QuestionTypeToString((QuestionType)((int)_CurrentQuestion["Type"].Number));
|
||||
|
||||
_GameHasBegun = true;
|
||||
return;
|
||||
}
|
||||
// _GameHasBegun = true;
|
||||
// return;
|
||||
//}
|
||||
|
||||
AdvanceQuestion();
|
||||
//AdvanceQuestion();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@ public class HostCardManager : UdonSharpBehaviour
|
||||
[SerializeField] private HostCardTheChaseInterface _TheChaseInterface;
|
||||
[SerializeField] private HostCardFinalRoundInterface _FinalRoundInterface;
|
||||
|
||||
//[SerializeField] private HostCardRound2Interface _Round2Interface;
|
||||
|
||||
[SerializeField] private HostPanelInterface _AdminPanelInterface;
|
||||
|
||||
public override void OnPickup()
|
||||
@@ -90,7 +92,7 @@ public class HostCardManager : UdonSharpBehaviour
|
||||
}
|
||||
|
||||
|
||||
public HostCardInterfaceBase EnableHostCardDisplay(QuestionType Type)
|
||||
public HostCardInterfaceBase EnableHostCardDisplay(GameType Game, QuestionType Question)
|
||||
{
|
||||
_BetweenRoundsInterface.gameObject.SetActive(false);
|
||||
_MultipleChoiceInterface.gameObject.SetActive(false);
|
||||
@@ -98,29 +100,47 @@ public class HostCardManager : UdonSharpBehaviour
|
||||
_TheChaseInterface.gameObject.SetActive(false);
|
||||
_FinalRoundInterface.gameObject.SetActive(false);
|
||||
|
||||
switch (Type)
|
||||
//_Round2Interface.gameObject.SetActive(false);
|
||||
|
||||
switch (Game)
|
||||
{
|
||||
case QuestionType.BetweenRounds:
|
||||
_BetweenRoundsInterface.gameObject.SetActive(true);
|
||||
return _BetweenRoundsInterface;
|
||||
case QuestionType.MultipleChoice:
|
||||
_MultipleChoiceInterface.gameObject.SetActive(true);
|
||||
return _MultipleChoiceInterface;
|
||||
case QuestionType.LightningRound:
|
||||
_LightningRoundInterface.gameObject.SetActive(true);
|
||||
return _LightningRoundInterface;
|
||||
case QuestionType.DumpsterDive: break;
|
||||
case QuestionType.TheChase:
|
||||
_TheChaseInterface.gameObject.SetActive(true);
|
||||
return _TheChaseInterface;
|
||||
case QuestionType.FinalRound:
|
||||
_FinalRoundInterface.gameObject.SetActive(true);
|
||||
return _FinalRoundInterface;
|
||||
case QuestionType.Tiebreaker:
|
||||
case GameType.LocateTheCrook:
|
||||
{
|
||||
switch (Question)
|
||||
{
|
||||
case QuestionType.MultipleChoice:
|
||||
_MultipleChoiceInterface.gameObject.SetActive(true);
|
||||
return _MultipleChoiceInterface;
|
||||
case QuestionType.LightningRound:
|
||||
_LightningRoundInterface.gameObject.SetActive(true);
|
||||
return _LightningRoundInterface;
|
||||
case QuestionType.DumpsterDive: break;
|
||||
case QuestionType.TheChase:
|
||||
_TheChaseInterface.gameObject.SetActive(true);
|
||||
return _TheChaseInterface;
|
||||
case QuestionType.FinalRound:
|
||||
_FinalRoundInterface.gameObject.SetActive(true);
|
||||
return _FinalRoundInterface;
|
||||
case QuestionType.Tiebreaker:
|
||||
default:
|
||||
_BetweenRoundsInterface.gameObject.SetActive(true);
|
||||
return _BetweenRoundsInterface;
|
||||
}
|
||||
} break;
|
||||
case GameType.RecoverTheLoot:
|
||||
{
|
||||
|
||||
} break;
|
||||
case GameType.ChaseCarmen:
|
||||
{
|
||||
|
||||
} break;
|
||||
default:
|
||||
_BetweenRoundsInterface.gameObject.SetActive(true);
|
||||
return _BetweenRoundsInterface;
|
||||
}
|
||||
|
||||
_BetweenRoundsInterface.gameObject.SetActive(true);
|
||||
return _BetweenRoundsInterface;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,25 +44,25 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
Data: 2
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _Animator
|
||||
Data: LocationPanelText
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _Animator
|
||||
Data: LocationPanelText
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 3|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: UnityEngine.Animator, UnityEngine.AnimationModule
|
||||
Data: TMPro.TextMeshProUGUI[], Unity.TextMeshPro
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
@@ -80,7 +80,7 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: <IsSerialized>k__BackingField
|
||||
Entry: 5
|
||||
Data: false
|
||||
Data: true
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 4|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
@@ -99,6 +99,60 @@ MonoBehaviour:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _Animator
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 5|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _Animator
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 6|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: UnityEngine.Animator, UnityEngine.AnimationModule
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 6
|
||||
- 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: 7|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: 13
|
||||
Data:
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
|
||||
using TMPro;
|
||||
using UdonSharp;
|
||||
using UnityEngine;
|
||||
using VRC.SDK3.UdonNetworkCalling;
|
||||
@@ -10,8 +11,11 @@ using VRC.Udon.Common.Interfaces;
|
||||
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
|
||||
public class LocationBoard : UdonSharpBehaviour
|
||||
{
|
||||
public TextMeshProUGUI[] LocationPanelText;
|
||||
|
||||
private Animator _Animator;
|
||||
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_Animator = GetComponent<Animator>();
|
||||
|
||||
@@ -12,7 +12,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
||||
m_Name: BoneFollower
|
||||
m_EditorClassIdentifier:
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: 52ecc8a73071e8e40928c3609699fcf4,
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: ccbda9bf23e2f714c9226283c77a92e5,
|
||||
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: 873dfce61b1514e429c92e0d2fded7de,
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: 405e38d3dfb2f514daeed0e28fbb4864,
|
||||
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: e81558796a212ab4d88e305e2010f24b,
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: f938e6c4ff027a74da405a1f9353fd2b,
|
||||
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: 2fe8ced6184000f49bca526cd2c5891c,
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: c49c9265a3ef24642a6a4465d0a78872,
|
||||
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: a2d01d9f36ac6df49831be249e48ecc4,
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: 04024a76ab1924042ba521e11cb76d91,
|
||||
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: 1b89d4552983c0448a7389decec3b555,
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: 17f8fbbe6cc186d4f8dbb057b01a4ec2,
|
||||
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: 994b559b0f158b4499f8937980ed8694,
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: 128d924a3066b7546b2d1c73e61006ab,
|
||||
type: 2}
|
||||
udonAssembly:
|
||||
assemblyError:
|
||||
|
||||
Reference in New Issue
Block a user