- ACME Crimenet Computer can now show messages that only the host can see.
- Added a doorway between the spawn room and the control room. - Video load indicators set to a hidden position by default. - Renamed "Assorted Textures" folder to "Assorted"; they're not textures. - Removed superfluous debug statements from CaseVideoSyncPlayer.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,14 +1,10 @@
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Remoting;
|
||||
using TMPro;
|
||||
using UdonSharp;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
using VRC.SDK3.Image;
|
||||
using VRC.SDK3.UdonNetworkCalling;
|
||||
using VRC.SDKBase;
|
||||
using VRC.Udon;
|
||||
using VRC.Udon.Common.Interfaces;
|
||||
|
||||
|
||||
@@ -17,6 +13,7 @@ public class ACMECrimenetComputer : UdonSharpBehaviour
|
||||
{
|
||||
[SerializeField] private GameManagerRound1 _GameManager;
|
||||
[SerializeField] private AudioManager _AudioManager;
|
||||
[SerializeField] private PermissionsPanel _PermissionsPanel;
|
||||
|
||||
[Space]
|
||||
[SerializeField] private GameObject _ComputerBase;
|
||||
@@ -35,6 +32,11 @@ public class ACMECrimenetComputer : UdonSharpBehaviour
|
||||
[SerializeField] private Transform _TranslatedCardAnimator;
|
||||
[SerializeField] private TextMeshProUGUI _TranslatedTextGUI;
|
||||
|
||||
[Space]
|
||||
|
||||
[SerializeField] private GameObject _HiddenTextCanvas;
|
||||
[SerializeField] private TextMeshProUGUI _HiddenTextGUI;
|
||||
|
||||
[Space]
|
||||
[SerializeField] private GameObject[] _Interactables;
|
||||
|
||||
@@ -42,6 +44,7 @@ public class ACMECrimenetComputer : UdonSharpBehaviour
|
||||
[UdonSynced, FieldChangeCallback(nameof(Activate))] private bool _Activate = false;
|
||||
[UdonSynced, FieldChangeCallback(nameof(UntranslatedText))] private string _UntranslatedText = "";
|
||||
[UdonSynced, FieldChangeCallback(nameof(TranslatedText))] private string _TranslatedText = "";
|
||||
[UdonSynced, FieldChangeCallback(nameof(HiddenText))] private string _HiddenText = "";
|
||||
|
||||
[UdonSynced, FieldChangeCallback(nameof(ClueImage))] private int _ClueImage = -1;
|
||||
[UdonSynced, FieldChangeCallback(nameof(ClueImageScale))] private float _ClueImageScale = 1.0f;
|
||||
@@ -78,6 +81,16 @@ public class ACMECrimenetComputer : UdonSharpBehaviour
|
||||
RequestSerialization();
|
||||
}
|
||||
|
||||
private void SetHiddenText(string Hidden)
|
||||
{
|
||||
_HiddenText = Hidden;
|
||||
_HiddenTextGUI.text = _HiddenText;
|
||||
|
||||
_HiddenTextCanvas.SetActive(_HiddenText != "" && _PermissionsPanel.IsPlayerHost(Networking.LocalPlayer));
|
||||
|
||||
RequestSerialization();
|
||||
}
|
||||
|
||||
|
||||
private void SwooceRightIn()
|
||||
{
|
||||
@@ -97,6 +110,7 @@ public class ACMECrimenetComputer : UdonSharpBehaviour
|
||||
{
|
||||
Interactable.SetActive(false);
|
||||
}
|
||||
_HiddenTextCanvas.SetActive(false);
|
||||
|
||||
ClueImageScale = 1.0f;
|
||||
|
||||
@@ -204,6 +218,15 @@ public class ACMECrimenetComputer : UdonSharpBehaviour
|
||||
get => _TranslatedText;
|
||||
}
|
||||
|
||||
public string HiddenText
|
||||
{
|
||||
set
|
||||
{
|
||||
SetHiddenText(value);
|
||||
}
|
||||
get => _HiddenText;
|
||||
}
|
||||
|
||||
public int ClueImage
|
||||
{
|
||||
set
|
||||
|
||||
@@ -236,9 +236,7 @@ public class CaseVideoSyncPlayer : UdonSharpBehaviour
|
||||
{
|
||||
if (FlashCorrectAnswer)
|
||||
{
|
||||
Debug.Log("[CaseVideoSyncPlayer] Flashing correct answer.");
|
||||
SubMapIndex = (SubMapIndex == 4) ? 3 : 4;
|
||||
Debug.Log("[CaseVideoSyncPlayer] New submap is " + SubMapIndex);
|
||||
_UpdateMap(false);
|
||||
SendCustomEventDelayedSeconds(nameof(NextCorrectAnswerFrame), 0.2f);
|
||||
}
|
||||
@@ -254,12 +252,9 @@ public class CaseVideoSyncPlayer : UdonSharpBehaviour
|
||||
|
||||
private void _UpdateMap(bool Sync = true)
|
||||
{
|
||||
Debug.Log("[CaseVideoSyncPlayer] Now inside _UpdateMap()");
|
||||
int MapPage = SubMapIndex / IMAGES_PER_MAP_ATLAS;
|
||||
Debug.Log("[CaseVideoSyncPlayer] Map page: " + MapPage);
|
||||
if (MapPage < _MapImages.Length)
|
||||
{
|
||||
Debug.Log("[CaseVideoSyncPlayer] Updating submap.");
|
||||
_UpdateSubMap(MapPage);
|
||||
ShowScreen = ClueScreenType.Map;
|
||||
}
|
||||
@@ -271,9 +266,7 @@ public class CaseVideoSyncPlayer : UdonSharpBehaviour
|
||||
}
|
||||
private void _UpdateSubMap(int MapPage = -1)
|
||||
{
|
||||
Debug.Log("[CaseVideoSyncPlayer] Now inside _UpdateSubMap()");
|
||||
int SubmapIndexWrapped = SubMapIndex % IMAGES_PER_MAP_ATLAS;
|
||||
Debug.Log("[CaseVideoSyncPlayer] Wrapped submap index: " + SubmapIndexWrapped);
|
||||
switch (SubmapIndexWrapped)
|
||||
{
|
||||
case 0: _MapScreenMaterial.SetVector("_MainTex_ST", new Vector4(0.5f, 0.33333333f, 0.0f, 0.66666666f)); break;
|
||||
|
||||
@@ -346,6 +346,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
|
||||
string UntranslatedText = "";
|
||||
string TranslatedText = "";
|
||||
string HiddenText = "";
|
||||
if (Presentation.ContainsKey("Clue Text"))
|
||||
{
|
||||
UntranslatedText = Presentation["Clue Text"].String;
|
||||
@@ -360,6 +361,11 @@ public class GameManagerRound1 : GameManagerBase
|
||||
TranslatedText = UntranslatedText;
|
||||
}
|
||||
|
||||
if (Presentation.ContainsKey("Hidden Text"))
|
||||
{
|
||||
HiddenText = Presentation["Hidden Text"].String;
|
||||
}
|
||||
|
||||
if (Presentation.ContainsKey("Clue Image"))
|
||||
{
|
||||
_ACMECrimenetComputer.ClueImage = (int)Presentation["Clue Image"].DataList[0].Number;
|
||||
@@ -372,6 +378,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
|
||||
_ACMECrimenetComputer.UntranslatedText = UntranslatedText;
|
||||
_ACMECrimenetComputer.TranslatedText = TranslatedText;
|
||||
_ACMECrimenetComputer.HiddenText = HiddenText;
|
||||
|
||||
_ACMECrimenetComputer.Activate = true;
|
||||
|
||||
@@ -418,22 +425,6 @@ public class GameManagerRound1 : GameManagerBase
|
||||
HostCardBetweenRoundsInterface Interface =
|
||||
(HostCardBetweenRoundsInterface)GetHostCardInterface(RoundSegmentType.BetweenSegments);
|
||||
|
||||
string UntranslatedText = "";
|
||||
string TranslatedText = "";
|
||||
if (Presentation.ContainsKey("Clue Text"))
|
||||
{
|
||||
UntranslatedText = Presentation["Clue Text"].String;
|
||||
}
|
||||
|
||||
if (Presentation.ContainsKey("Translated Text"))
|
||||
{
|
||||
TranslatedText = Presentation["Translated Text"].String;
|
||||
}
|
||||
else
|
||||
{
|
||||
TranslatedText = UntranslatedText;
|
||||
}
|
||||
|
||||
if (Presentation.ContainsKey("Clue Notes") && Presentation["Clue Notes"].TokenType == TokenType.DataList)
|
||||
{
|
||||
DataList ClueNotes = Presentation["Clue Notes"].DataList;
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
|
||||
using UdonSharp;
|
||||
using UnityEngine;
|
||||
using VRC.SDKBase;
|
||||
using VRC.Udon;
|
||||
using VRC.Udon.Serialization.OdinSerializer;
|
||||
|
||||
|
||||
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
|
||||
|
||||
Reference in New Issue
Block a user