diff --git a/SSLR/Assets/Scenes/LiviPlayground.unity b/SSLR/Assets/Scenes/LiviPlayground.unity index 5e959ac..200c697 100644 --- a/SSLR/Assets/Scenes/LiviPlayground.unity +++ b/SSLR/Assets/Scenes/LiviPlayground.unity @@ -2500,12 +2500,6 @@ MonoBehaviour: serviceTick: {fileID: 972086447} takeDocumentsTick: {fileID: 675043657} giveDocumentsTick: {fileID: 201719675} - comcareServiceButton: {fileID: 2143047714} - fscServiceButton: {fileID: 1137450851} - peersServiceButton: {fileID: 405944146} - transitionalSheltersServiceButton: {fileID: 144678493} - cpsServiceButton: {fileID: 1270430611} - sgEnableServiceButton: {fileID: 783080947} currentDocument: {fileID: 0} --- !u!1 &278641001 GameObject: @@ -6150,63 +6144,6 @@ MonoBehaviour: m_OnKeyboardFocusChanged: m_PersistentCalls: m_Calls: [] ---- !u!1001 &669125608 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 7579783095933529078, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} - propertyPath: m_Name - value: Stamp_Diabilities - objectReference: {fileID: 0} - - target: {fileID: 7591921673328099837, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} - propertyPath: m_LocalPosition.x - value: 0.5992 - objectReference: {fileID: 0} - - target: {fileID: 7591921673328099837, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} - propertyPath: m_LocalPosition.y - value: 0.8763829 - objectReference: {fileID: 0} - - target: {fileID: 7591921673328099837, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} - propertyPath: m_LocalPosition.z - value: 1.1857 - objectReference: {fileID: 0} - - target: {fileID: 7591921673328099837, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7591921673328099837, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7591921673328099837, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 7591921673328099837, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 7591921673328099837, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7591921673328099837, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7591921673328099837, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} --- !u!1 &675043657 stripped GameObject: m_CorrespondingSourceObject: {fileID: 4601194076290656434, guid: 7795d1095e0684f468f5b8231bb7705f, type: 3} @@ -15212,6 +15149,63 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1468703799 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 7579783095933529078, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} + propertyPath: m_Name + value: Stamp_Disabilities + objectReference: {fileID: 0} + - target: {fileID: 7591921673328099837, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} + propertyPath: m_LocalPosition.x + value: 0.5992 + objectReference: {fileID: 0} + - target: {fileID: 7591921673328099837, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} + propertyPath: m_LocalPosition.y + value: 0.8763829 + objectReference: {fileID: 0} + - target: {fileID: 7591921673328099837, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} + propertyPath: m_LocalPosition.z + value: 1.1857 + objectReference: {fileID: 0} + - target: {fileID: 7591921673328099837, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7591921673328099837, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7591921673328099837, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7591921673328099837, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7591921673328099837, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7591921673328099837, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7591921673328099837, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} --- !u!1 &1479080137 GameObject: m_ObjectHideFlags: 0 @@ -21352,4 +21346,4 @@ SceneRoots: - {fileID: 1339160292} - {fileID: 1399971910} - {fileID: 43707400} - - {fileID: 669125608} + - {fileID: 1468703799} diff --git a/SSLR/Assets/Scripts/PaperSocket.cs b/SSLR/Assets/Scripts/PaperSocket.cs index d39761d..58c866f 100644 --- a/SSLR/Assets/Scripts/PaperSocket.cs +++ b/SSLR/Assets/Scripts/PaperSocket.cs @@ -64,14 +64,16 @@ public class PaperSocket : MonoBehaviour { if (stampDoc.isStamped && stampDoc.isSigned) { - Debug.Log("Document given"); PlayerDialogueInteraction.instance.takeDocumentsTick.SetActive(true); PlayerDialogueInteraction.instance.giveDocumentsTick.SetActive(true); + + var paperDepartment = stampDoc.CheckFinalDepartment(); + Debug.Log(paperDepartment); + Destroy(paperObject); } 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 fc9c981..0476003 100644 --- a/SSLR/Assets/Scripts/PenInteractor.cs +++ b/SSLR/Assets/Scripts/PenInteractor.cs @@ -32,6 +32,8 @@ public class PenInteractor : MonoBehaviour if(stampDocScript != null) { + PlayerDialogueInteraction.instance.currentDocument = stampDocScript.gameObject; + if(!stampDocScript.isSigned) { PlayerDialogueInteraction.instance.servicesPanel.SetActive(true); diff --git a/SSLR/Assets/Scripts/PlayerDialogueInteraction.cs b/SSLR/Assets/Scripts/PlayerDialogueInteraction.cs index 8168e81..41515b8 100644 --- a/SSLR/Assets/Scripts/PlayerDialogueInteraction.cs +++ b/SSLR/Assets/Scripts/PlayerDialogueInteraction.cs @@ -205,9 +205,16 @@ public class PlayerDialogueInteraction : MonoBehaviour /// public void OnServiceSelected(string service) { - servicesPanel.SetActive(false); - questionPanel.SetActive(true); + if (currentDocument != null) + { + servicesPanel.SetActive(false); + questionPanel.SetActive(true); - currentDocument.GetComponent().Sign(service); + currentDocument.GetComponent().Sign(service); + } + else + { + Debug.LogError("currentDocument is null"); + } } } diff --git a/SSLR/Assets/Scripts/StampDocument.cs b/SSLR/Assets/Scripts/StampDocument.cs index fd512a0..b7dcaab 100644 --- a/SSLR/Assets/Scripts/StampDocument.cs +++ b/SSLR/Assets/Scripts/StampDocument.cs @@ -40,7 +40,7 @@ public class StampDocument : MonoBehaviour /// See finalised document detail /// /// - private string CheckFinalDepartment() + public string CheckFinalDepartment() { return $"{assignedDepartment}-{assignedService}"; } @@ -160,20 +160,4 @@ public class StampDocument : MonoBehaviour } } - - - /// - /// Declares this is current document - /// - /// - private void OnColliderEnter(Collider collision) - { - if (collision.gameObject.CompareTag("Pen")) - { - /* - PlayerDialogueInteraction.instance.servicesPanel.SetActive(true); - */ - PlayerDialogueInteraction.instance.currentDocument = gameObject; - } - } } \ No newline at end of file