- Videos are now preloaded before being played to reduce awkward pauses.

- Functions for changing host ownership were added to game and case managers.
- Updated Patty's Africa call.
- Due to issues, this reverts commit 5f19645fee.
This commit is contained in:
2025-08-20 23:19:57 -04:00
parent 5f19645fee
commit 0c7c929167
15 changed files with 630 additions and 237 deletions
+162 -54
View File
@@ -44,7 +44,7 @@ MonoBehaviour:
Data:
- Name:
Entry: 12
Data: 18
Data: 20
- Name:
Entry: 7
Data:
@@ -671,13 +671,13 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _CaseFileClueImages
Data: _CaseFileVideosFallback
- Name: $v
Entry: 7
Data: 44|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _CaseFileClueImages
Data: _CaseFileVideosFallback
- Name: <UserType>k__BackingField
Entry: 9
Data: 38
@@ -725,25 +725,19 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _CaseTitle
Data: _CaseFileClueImages
- Name: $v
Entry: 7
Data: 47|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _CaseTitle
Data: _CaseFileClueImages
- Name: <UserType>k__BackingField
Entry: 7
Data: 48|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.String, mscorlib
- Name:
Entry: 8
Data:
Entry: 9
Data: 38
- Name: <SystemType>k__BackingField
Entry: 9
Data: 48
Data: 38
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -758,13 +752,13 @@ MonoBehaviour:
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 49|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 48|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 50|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
Data: 49|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
@@ -785,19 +779,25 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _CaseDescription
Data: _CaseTitle
- Name: $v
Entry: 7
Data: 51|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 50|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _CaseDescription
Data: _CaseTitle
- Name: <UserType>k__BackingField
Entry: 9
Data: 48
Entry: 7
Data: 51|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.String, mscorlib
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 48
Data: 51
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -839,19 +839,19 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _CaseIntroVideoTranscript
Data: _CaseDescription
- Name: $v
Entry: 7
Data: 54|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _CaseIntroVideoTranscript
Data: _CaseDescription
- Name: <UserType>k__BackingField
Entry: 9
Data: 48
Data: 51
- Name: <SystemType>k__BackingField
Entry: 9
Data: 48
Data: 51
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -893,19 +893,25 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _StolenLoot
Data: _CaseIntroVideo
- Name: $v
Entry: 7
Data: 57|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _StolenLoot
Data: _CaseIntroVideo
- Name: <UserType>k__BackingField
Entry: 9
Data: 48
Entry: 7
Data: 58|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.Int32, mscorlib
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 48
Data: 58
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -920,13 +926,121 @@ MonoBehaviour:
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 58|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 59|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 59|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
Data: 60|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: _CaseIntroVideoTranscript
- Name: $v
Entry: 7
Data: 61|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _CaseIntroVideoTranscript
- Name: <UserType>k__BackingField
Entry: 9
Data: 51
- Name: <SystemType>k__BackingField
Entry: 9
Data: 51
- 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: 62|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 63|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: _StolenLoot
- Name: $v
Entry: 7
Data: 64|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _StolenLoot
- Name: <UserType>k__BackingField
Entry: 9
Data: 51
- Name: <SystemType>k__BackingField
Entry: 9
Data: 51
- 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: 65|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 66|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
@@ -950,13 +1064,13 @@ MonoBehaviour:
Data: _AccusedCrook
- Name: $v
Entry: 7
Data: 60|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 67|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _AccusedCrook
- Name: <UserType>k__BackingField
Entry: 7
Data: 61|System.RuntimeType, mscorlib
Data: 68|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: AccusedCrook, Assembly-CSharp
@@ -964,14 +1078,8 @@ MonoBehaviour:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 7
Data: 62|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.Int32, mscorlib
- Name:
Entry: 8
Data:
Entry: 9
Data: 58
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -986,13 +1094,13 @@ MonoBehaviour:
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 63|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 69|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 64|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
Data: 70|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
@@ -1016,13 +1124,13 @@ MonoBehaviour:
Data: _CurrentWinningPlayers
- Name: $v
Entry: 7
Data: 65|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 71|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _CurrentWinningPlayers
- Name: <UserType>k__BackingField
Entry: 7
Data: 66|System.RuntimeType, mscorlib
Data: 72|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.String[], mscorlib
@@ -1031,7 +1139,7 @@ MonoBehaviour:
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 66
Data: 72
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -1046,13 +1154,13 @@ MonoBehaviour:
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 67|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 73|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 68|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
Data: 74|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
@@ -1076,13 +1184,13 @@ MonoBehaviour:
Data: _CaseFileDictionary
- Name: $v
Entry: 7
Data: 69|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 75|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _CaseFileDictionary
- Name: <UserType>k__BackingField
Entry: 7
Data: 70|System.RuntimeType, mscorlib
Data: 76|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: VRC.SDK3.Data.DataDictionary, VRCSDK3
@@ -1091,7 +1199,7 @@ MonoBehaviour:
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 70
Data: 76
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -1106,7 +1214,7 @@ MonoBehaviour:
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 71|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 77|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 0
+12 -4
View File
@@ -43,10 +43,12 @@ public class CaseManager : UdonSharpBehaviour
[UdonSynced] private VRCUrl _CaseFileLootImage;
[UdonSynced] private VRCUrl[] _CaseFileMaps;
[UdonSynced] private VRCUrl[] _CaseFileVideos;
[UdonSynced] private VRCUrl[] _CaseFileVideosFallback;
[UdonSynced] private VRCUrl[] _CaseFileClueImages;
[UdonSynced] private string _CaseTitle = "";
[UdonSynced] private string _CaseDescription = "";
[UdonSynced] private int _CaseIntroVideo = -1;
[UdonSynced] private string _CaseIntroVideoTranscript = "";
[UdonSynced] private string _StolenLoot = "";
[UdonSynced] private AccusedCrook _AccusedCrook = AccusedCrook.INDEX_MAX;
@@ -79,6 +81,7 @@ public class CaseManager : UdonSharpBehaviour
_CaseFileLootImage = CaseFile.LootImage;
_CaseFileMaps = CaseFile.MapFiles;
_CaseFileVideos = CaseFile.VideoFiles;
_CaseFileVideosFallback = CaseFile.FallbackVideoFiles;
_CaseFileClueImages = CaseFile.ClueImages;
VRCStringDownloader.LoadUrl(_CaseFileCluesURL, (IUdonEventReceiver)this);
@@ -102,6 +105,11 @@ public class CaseManager : UdonSharpBehaviour
_StolenLoot = _CaseFileDictionary["Stolen Loot"].String;
_AccusedCrook = (AccusedCrook)(int)_CaseFileDictionary["Accused Crook"].Number;
if (_CaseFileDictionary.ContainsKey("Intro Video"))
{
_CaseIntroVideo = (int)_CaseFileDictionary["Intro Video"].Number;
}
if (_CaseFileDictionary.ContainsKey("Intro Video Transcript"))
{
_CaseIntroVideoTranscript = _CaseFileDictionary["Intro Video Transcript"].String;
@@ -234,13 +242,13 @@ public class CaseManager : UdonSharpBehaviour
return _CaseFileLootImage;
}
public VRCUrl GetIntroVideo()
public int GetIntroVideo()
{
return _CaseFileVideos[0];
return _CaseIntroVideo;
}
public VRCUrl GetVideo(int VideoIndex)
public VRCUrl GetVideo(int VideoIndex, bool Fallback = false)
{
return _CaseFileVideos[VideoIndex];
return (Fallback && _CaseFileVideosFallback.Length >= VideoIndex) ? _CaseFileVideosFallback[VideoIndex] : _CaseFileVideos[VideoIndex];
}
public int GetVideoCount()
{
@@ -44,7 +44,7 @@ MonoBehaviour:
Data:
- Name:
Entry: 12
Data: 11
Data: 12
- Name:
Entry: 7
Data:
@@ -455,13 +455,13 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: ClueImages
Data: FallbackVideoFiles
- Name: $v
Entry: 7
Data: 27|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: ClueImages
Data: FallbackVideoFiles
- Name: <UserType>k__BackingField
Entry: 9
Data: 23
@@ -503,16 +503,64 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _CaseTitleText
Data: ClueImages
- Name: $v
Entry: 7
Data: 29|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: ClueImages
- Name: <UserType>k__BackingField
Entry: 9
Data: 23
- Name: <SystemType>k__BackingField
Entry: 9
Data: 23
- 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: 30|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: _CaseTitleText
- Name: $v
Entry: 7
Data: 31|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _CaseTitleText
- Name: <UserType>k__BackingField
Entry: 7
Data: 30|System.RuntimeType, mscorlib
Data: 32|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: TMPro.TextMeshProUGUI, Unity.TextMeshPro
@@ -521,7 +569,7 @@ MonoBehaviour:
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 30
Data: 32
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -536,13 +584,13 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 31|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 33|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 2
- Name:
Entry: 7
Data: 32|UnityEngine.SpaceAttribute, UnityEngine.CoreModule
Data: 34|UnityEngine.SpaceAttribute, UnityEngine.CoreModule
- Name: height
Entry: 4
Data: 8
@@ -551,7 +599,7 @@ MonoBehaviour:
Data:
- Name:
Entry: 7
Data: 33|UnityEngine.SerializeField, UnityEngine.CoreModule
Data: 35|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
@@ -575,16 +623,16 @@ MonoBehaviour:
Data: _CrookNameText
- Name: $v
Entry: 7
Data: 34|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 36|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _CrookNameText
- Name: <UserType>k__BackingField
Entry: 9
Data: 30
Data: 32
- Name: <SystemType>k__BackingField
Entry: 9
Data: 30
Data: 32
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -599,13 +647,13 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 35|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 37|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 36|UnityEngine.SerializeField, UnityEngine.CoreModule
Data: 38|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
@@ -629,16 +677,16 @@ MonoBehaviour:
Data: _StolenLootText
- Name: $v
Entry: 7
Data: 37|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 39|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _StolenLootText
- Name: <UserType>k__BackingField
Entry: 9
Data: 30
Data: 32
- Name: <SystemType>k__BackingField
Entry: 9
Data: 30
Data: 32
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -653,13 +701,13 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 38|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 40|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 39|UnityEngine.SerializeField, UnityEngine.CoreModule
Data: 41|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
@@ -20,6 +20,7 @@ public class CaseManagerListEntry : UdonSharpBehaviour
public VRCUrl LootImage;
public VRCUrl[] MapFiles;
public VRCUrl[] VideoFiles;
public VRCUrl[] FallbackVideoFiles;
public VRCUrl[] ClueImages;
[Space]
@@ -2,6 +2,7 @@
using UdonSharp;
using UnityEngine;
using VRC.SDK3.Data;
using VRC.SDKBase;
using VRC.Udon.Common.Interfaces;
@@ -79,6 +80,8 @@ public class GameManagerBase : UdonSharpBehaviour
public virtual void InitialiseGameMode() { }
public virtual void SetOwnershipOfObjects(VRCPlayerApi NewOwner) { }
public virtual void LoadQuestionData(DataToken Data) { }
@@ -64,10 +64,7 @@ public class GameManagerRound1 : GameManagerBase
_PlayerBuzzInAllowed = new bool[_PlayerPodiums.Length];
VRCPlayerApi Owner = Networking.GetOwner(gameObject);
Networking.SetOwner(Owner, _VideoPlayer.gameObject);
Networking.SetOwner(Owner, _Modem.gameObject);
Networking.SetOwner(Owner, _ArrivalDisplay.gameObject);
Networking.SetOwner(Owner, _VideoMusicClueSkateboard.gameObject);
SetOwnershipOfObjects(Owner);
_Modem.Activate(false);
_ArrivalDisplay.Activate(false);
@@ -81,6 +78,16 @@ public class GameManagerRound1 : GameManagerBase
base.InitialiseGameMode();
}
public override void SetOwnershipOfObjects(VRCPlayerApi NewOwner)
{
Networking.SetOwner(NewOwner, _VideoPlayer.gameObject);
Networking.SetOwner(NewOwner, _Modem.gameObject);
Networking.SetOwner(NewOwner, _ArrivalDisplay.gameObject);
Networking.SetOwner(NewOwner, _VideoMusicClueSkateboard.gameObject);
base.SetOwnershipOfObjects(NewOwner);
}
public void PlaySecondPartOfThemeMusic()
{
EnableInteraction("Start Game");
@@ -115,8 +122,23 @@ public class GameManagerRound1 : GameManagerBase
Interface.HeaderUI.text = _CaseManager.GetCaseTitle() + " has been loaded.";
Interface.CommentUI.text = _CaseManager.GetCaseDescription();
TryIntroVideoLoad();
_GameHasBegun = false;
}
public void TryIntroVideoLoad()
{
int IntroVideoIndex = _CaseManager.GetIntroVideo();
if (IntroVideoIndex >= 0)
{
_VideoPlayer.VideoIndex = IntroVideoIndex;
}
else
{
Debug.LogWarning("[GameManagerRound1] Intro video index is currently invalid. Retrying...");
SendCustomEventDelayedSeconds(nameof(TryIntroVideoLoad), 1.0f);
}
}
private void PlayIntroVideo()
@@ -128,12 +150,13 @@ public class GameManagerRound1 : GameManagerBase
Interface.HeaderUI.text = "Playing intro video...";
Interface.CommentUI.text = _CaseManager.GetIntroVideoTranscript();
_VideoPlayer.VideoURL = _CaseManager.GetIntroVideo();
for (int i = 0; i < _PlayerPodiums.Length; i++)
{
_PlayerPodiums[i].SendCustomNetworkEvent(NetworkEventTarget.Owner, "ShowAuxiliaryVideoScreen", true);
}
_VideoPlayer.PlayVideo = true;
EnableInteraction("Assign Points");
}
@@ -230,7 +253,7 @@ public class GameManagerRound1 : GameManagerBase
{
Interface.CommentUI.text = "";
}
_VideoPlayer.VideoURL = _CaseManager.GetVideo((int)Videos[_QuestionSubstage].Number);
_VideoPlayer.PlayVideo = true;
_QuestionSubstage++;
if (_QuestionSubstage < Videos.Count)
@@ -290,7 +313,7 @@ public class GameManagerRound1 : GameManagerBase
}
DataList Videos = Presentation["Videos"].DataList;
_VideoPlayer.VideoURL = _CaseManager.GetVideo((int)Videos[0].Number);
_VideoPlayer.PlayVideo = true;
}
_QuestionSubstage++;
@@ -1613,6 +1636,8 @@ public class GameManagerRound1 : GameManagerBase
Interface.CommentUI.text = "";
bool VideosAvailable = false;
string PresentationMediumString = "";
if (_CurrentQuestion.ContainsKey("Presentation"))
{
@@ -1640,15 +1665,31 @@ public class GameManagerRound1 : GameManagerBase
{
Interface.CommentUI.text = Presentation["Clue Description"].String;
}
if (Presentation.ContainsKey("Videos"))
{
DataList Videos = Presentation["Videos"].DataList;
_VideoPlayer.VideoIndex = (int)Videos[_QuestionSubstage].Number;
VideosAvailable = true;
}
}
else
{
PresentationMediumString = RoundSegmentTypeToString(_CurrentQuestionType);
EnableInteraction("Begin " + PresentationMediumString);
if (_CurrentQuestion.ContainsKey("Clue Description"))
{
Interface.CommentUI.text = _CurrentQuestion["Clue Description"].String;
}
if (VideosAvailable)
{
EnableInteraction("Play Videos");
}
else
{
EnableInteraction("Begin " + PresentationMediumString);
}
}
Interface.HeaderUI.text = "Upcoming Question: " + PresentationMediumString;