game: sign isnt working

This commit is contained in:
kookiekenobi 2025-02-17 21:40:02 +08:00
parent ff6a6399e4
commit f81c50b5a0
7 changed files with 30 additions and 12 deletions

View file

@ -5663,7 +5663,7 @@ MonoBehaviour:
m_OverrideVoxelSize: 0 m_OverrideVoxelSize: 0
m_VoxelSize: 0.06666667 m_VoxelSize: 0.06666667
m_MinRegionArea: 2 m_MinRegionArea: 2
m_NavMeshData: {fileID: 23800000, guid: e3436bd4caa03b0448c2702401bde1e3, type: 2} m_NavMeshData: {fileID: 23800000, guid: 0d3826611b9f1d141ab5b351c944490f, type: 2}
m_BuildHeightMesh: 1 m_BuildHeightMesh: 1
--- !u!114 &520849219 --- !u!114 &520849219
MonoBehaviour: MonoBehaviour:
@ -5719,7 +5719,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
url: https://fchobpauqasfebohuuam.supabase.co url: https://fchobpauqasfebohuuam.supabase.co
anonKey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImZjaG9icGF1cWFzZmVib2h1dWFtIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MzczNTYyNTUsImV4cCI6MjA1MjkzMjI1NX0.LkwCnzjtf8CPLrm6OONkjyjxZW8jE05V_spbOEeAXEM anonKey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImZjaG9icGF1cWFzZmVib2h1dWFtIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MzczNTYyNTUsImV4cCI6MjA1MjkzMjI1NX0.LkwCnzjtf8CPLrm6OONkjyjxZW8jE05V_spbOEeAXEM
menuButtons: {fileID: 0} menuButtons: {fileID: 387192628}
--- !u!1 &553967502 --- !u!1 &553967502
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -6867,7 +6867,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 0bab791ccf13189449b82b8f0b70b269, type: 3} m_Script: {fileID: 11500000, guid: 0bab791ccf13189449b82b8f0b70b269, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
shiftDuration: 20 shiftDuration: 60
npcSpawnArea: {fileID: 1126609776} npcSpawnArea: {fileID: 1126609776}
--- !u!1 &741702766 --- !u!1 &741702766
GameObject: GameObject:
@ -17536,6 +17536,10 @@ PrefabInstance:
serializedVersion: 3 serializedVersion: 3
m_TransformParent: {fileID: 1432899214} m_TransformParent: {fileID: 1432899214}
m_Modifications: m_Modifications:
- target: {fileID: 5163886654783036366, guid: 0197fe44356b38740b9747f44a27fa94, type: 3}
propertyPath: m_TagString
value: Pen
objectReference: {fileID: 0}
- target: {fileID: 8641240288083967895, guid: 0197fe44356b38740b9747f44a27fa94, type: 3} - target: {fileID: 8641240288083967895, guid: 0197fe44356b38740b9747f44a27fa94, type: 3}
propertyPath: m_Name propertyPath: m_Name
value: Mug_With_Tools_Pen value: Mug_With_Tools_Pen

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0d3826611b9f1d141ab5b351c944490f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 23800000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -54,7 +54,7 @@ public class PaperSocket : MonoBehaviour
GameObject paperObject = args.interactableObject.transform.gameObject; GameObject paperObject = args.interactableObject.transform.gameObject;
string paperName = paperObject.name; string paperName = paperObject.name;
if (socketName == "Paper Socket_NPC") if (socketName == "Paper Socket_NPC" && paperName == "Spawnable_Doc")
{ {
if (paperName == "Spawnable_Doc") if (paperName == "Spawnable_Doc")
{ {
@ -72,6 +72,8 @@ public class PaperSocket : MonoBehaviour
else else
{ {
Debug.Log("Either not stamped or not signed"); Debug.Log("Either not stamped or not signed");
XRSocketInteractor socket = GetComponent<XRSocketInteractor>();
socket.interactionManager.SelectExit(socket, args.interactableObject);
} }
} }
} }

View file

@ -35,6 +35,7 @@ public class PenInteractor : MonoBehaviour
if(!stampDocScript.isSigned) if(!stampDocScript.isSigned)
{ {
PlayerDialogueInteraction.instance.servicesPanel.SetActive(true); PlayerDialogueInteraction.instance.servicesPanel.SetActive(true);
PlayerDialogueInteraction.instance.questionPanel.SetActive(false);
} }
} }
else else
@ -44,5 +45,4 @@ public class PenInteractor : MonoBehaviour
} }
} }
} }
} }

View file

@ -44,13 +44,13 @@ public class PlayerDialogueInteraction : MonoBehaviour
public GameObject giveDocumentsTick; public GameObject giveDocumentsTick;
[Header("Services")] [Header("Services")]
public GameObject comcareServiceButton; /*public GameObject comcareServiceButton;
public GameObject fscServiceButton; public GameObject fscServiceButton;
public GameObject peersServiceButton; public GameObject peersServiceButton;
public GameObject transitionalSheltersServiceButton; public GameObject transitionalSheltersServiceButton;
public GameObject cpsServiceButton; public GameObject cpsServiceButton;
public GameObject sgEnableServiceButton; public GameObject sgEnableServiceButton;*/
public StampDocument currentDocument; public GameObject currentDocument;
/// <summary> /// <summary>
/// Do not destroy on load, and resetting UI /// Do not destroy on load, and resetting UI
@ -206,6 +206,8 @@ public class PlayerDialogueInteraction : MonoBehaviour
public void OnServiceSelected(string service) public void OnServiceSelected(string service)
{ {
servicesPanel.SetActive(false); servicesPanel.SetActive(false);
currentDocument.Sign(service); questionPanel.SetActive(true);
currentDocument.GetComponent<StampDocument>().Sign(service);
} }
} }

View file

@ -166,12 +166,14 @@ public class StampDocument : MonoBehaviour
/// Declares this is current document /// Declares this is current document
/// </summary> /// </summary>
/// <param name="other"></param> /// <param name="other"></param>
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.servicesPanel.SetActive(true);
PlayerDialogueInteraction.instance.currentDocument = this; */
PlayerDialogueInteraction.instance.currentDocument = gameObject;
} }
} }
} }