diff --git a/SSLR/Assets/Scenes/LiviPlayground.unity b/SSLR/Assets/Scenes/LiviPlayground.unity index 0a84988..5e959ac 100644 --- a/SSLR/Assets/Scenes/LiviPlayground.unity +++ b/SSLR/Assets/Scenes/LiviPlayground.unity @@ -5663,7 +5663,7 @@ MonoBehaviour: m_OverrideVoxelSize: 0 m_VoxelSize: 0.06666667 m_MinRegionArea: 2 - m_NavMeshData: {fileID: 23800000, guid: e3436bd4caa03b0448c2702401bde1e3, type: 2} + m_NavMeshData: {fileID: 23800000, guid: 0d3826611b9f1d141ab5b351c944490f, type: 2} m_BuildHeightMesh: 1 --- !u!114 &520849219 MonoBehaviour: @@ -5719,7 +5719,7 @@ MonoBehaviour: m_EditorClassIdentifier: url: https://fchobpauqasfebohuuam.supabase.co anonKey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImZjaG9icGF1cWFzZmVib2h1dWFtIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MzczNTYyNTUsImV4cCI6MjA1MjkzMjI1NX0.LkwCnzjtf8CPLrm6OONkjyjxZW8jE05V_spbOEeAXEM - menuButtons: {fileID: 0} + menuButtons: {fileID: 387192628} --- !u!1 &553967502 GameObject: m_ObjectHideFlags: 0 @@ -6867,7 +6867,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 0bab791ccf13189449b82b8f0b70b269, type: 3} m_Name: m_EditorClassIdentifier: - shiftDuration: 20 + shiftDuration: 60 npcSpawnArea: {fileID: 1126609776} --- !u!1 &741702766 GameObject: @@ -17536,6 +17536,10 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 1432899214} m_Modifications: + - target: {fileID: 5163886654783036366, guid: 0197fe44356b38740b9747f44a27fa94, type: 3} + propertyPath: m_TagString + value: Pen + objectReference: {fileID: 0} - target: {fileID: 8641240288083967895, guid: 0197fe44356b38740b9747f44a27fa94, type: 3} propertyPath: m_Name value: Mug_With_Tools_Pen diff --git a/SSLR/Assets/Scenes/LiviPlayground/NavMesh-Game Manager.asset b/SSLR/Assets/Scenes/LiviPlayground/NavMesh-Game Manager.asset new file mode 100644 index 0000000..cf72cbc Binary files /dev/null and b/SSLR/Assets/Scenes/LiviPlayground/NavMesh-Game Manager.asset differ diff --git a/SSLR/Assets/Scenes/LiviPlayground/NavMesh-Game Manager.asset.meta b/SSLR/Assets/Scenes/LiviPlayground/NavMesh-Game Manager.asset.meta new file mode 100644 index 0000000..a96d80c --- /dev/null +++ b/SSLR/Assets/Scenes/LiviPlayground/NavMesh-Game Manager.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0d3826611b9f1d141ab5b351c944490f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 23800000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/SSLR/Assets/Scripts/PaperSocket.cs b/SSLR/Assets/Scripts/PaperSocket.cs index c7a1471..d39761d 100644 --- a/SSLR/Assets/Scripts/PaperSocket.cs +++ b/SSLR/Assets/Scripts/PaperSocket.cs @@ -54,7 +54,7 @@ public class PaperSocket : MonoBehaviour GameObject paperObject = args.interactableObject.transform.gameObject; string paperName = paperObject.name; - if (socketName == "Paper Socket_NPC") + if (socketName == "Paper Socket_NPC" && paperName == "Spawnable_Doc") { if (paperName == "Spawnable_Doc") { @@ -72,6 +72,8 @@ public class PaperSocket : MonoBehaviour else { Debug.Log("Either not stamped or not signed"); + XRSocketInteractor socket = GetComponent(); + socket.interactionManager.SelectExit(socket, args.interactableObject); } } } diff --git a/SSLR/Assets/Scripts/PenInteractor.cs b/SSLR/Assets/Scripts/PenInteractor.cs index 7e37ec9..fc9c981 100644 --- a/SSLR/Assets/Scripts/PenInteractor.cs +++ b/SSLR/Assets/Scripts/PenInteractor.cs @@ -35,6 +35,7 @@ public class PenInteractor : MonoBehaviour if(!stampDocScript.isSigned) { PlayerDialogueInteraction.instance.servicesPanel.SetActive(true); + PlayerDialogueInteraction.instance.questionPanel.SetActive(false); } } else @@ -44,5 +45,4 @@ public class PenInteractor : MonoBehaviour } } } - } diff --git a/SSLR/Assets/Scripts/PlayerDialogueInteraction.cs b/SSLR/Assets/Scripts/PlayerDialogueInteraction.cs index 242a2b1..8168e81 100644 --- a/SSLR/Assets/Scripts/PlayerDialogueInteraction.cs +++ b/SSLR/Assets/Scripts/PlayerDialogueInteraction.cs @@ -44,13 +44,13 @@ public class PlayerDialogueInteraction : MonoBehaviour public GameObject giveDocumentsTick; [Header("Services")] - public GameObject comcareServiceButton; + /*public GameObject comcareServiceButton; public GameObject fscServiceButton; public GameObject peersServiceButton; public GameObject transitionalSheltersServiceButton; public GameObject cpsServiceButton; - public GameObject sgEnableServiceButton; - public StampDocument currentDocument; + public GameObject sgEnableServiceButton;*/ + public GameObject currentDocument; /// /// Do not destroy on load, and resetting UI @@ -206,6 +206,8 @@ public class PlayerDialogueInteraction : MonoBehaviour public void OnServiceSelected(string service) { servicesPanel.SetActive(false); - currentDocument.Sign(service); + questionPanel.SetActive(true); + + currentDocument.GetComponent().Sign(service); } } diff --git a/SSLR/Assets/Scripts/StampDocument.cs b/SSLR/Assets/Scripts/StampDocument.cs index 6ab60fd..fd512a0 100644 --- a/SSLR/Assets/Scripts/StampDocument.cs +++ b/SSLR/Assets/Scripts/StampDocument.cs @@ -166,12 +166,14 @@ public class StampDocument : MonoBehaviour /// Declares this is current document /// /// - private void OnTriggerEnter(Collider other) + private void OnColliderEnter(Collider collision) { - if (other.gameObject.CompareTag("Pen")) + if (collision.gameObject.CompareTag("Pen")) { + /* PlayerDialogueInteraction.instance.servicesPanel.SetActive(true); - PlayerDialogueInteraction.instance.currentDocument = this; + */ + PlayerDialogueInteraction.instance.currentDocument = gameObject; } } } \ No newline at end of file