diff --git a/SSLR/Assets/Scenes/Game Scene.unity b/SSLR/Assets/Scenes/Game Scene.unity
index 52b19ad..525e294 100644
--- a/SSLR/Assets/Scenes/Game Scene.unity
+++ b/SSLR/Assets/Scenes/Game Scene.unity
@@ -14949,7 +14949,7 @@ PrefabInstance:
m_Modifications:
- target: {fileID: 4857910982681371041, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3}
propertyPath: stampName
- value: Stamp_DV
+ value:
objectReference: {fileID: 0}
- target: {fileID: 5872023843001977328, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3}
propertyPath: m_SizeDelta.x
@@ -15176,7 +15176,7 @@ PrefabInstance:
m_Modifications:
- target: {fileID: 4857910982681371041, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3}
propertyPath: stampName
- value: Stamp_Residential
+ value:
objectReference: {fileID: 0}
- target: {fileID: 5872023843001977328, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3}
propertyPath: m_SizeDelta.x
@@ -39111,7 +39111,7 @@ PrefabInstance:
m_Modifications:
- target: {fileID: 4857910982681371041, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3}
propertyPath: stampName
- value: Stamp_Disabilities
+ value:
objectReference: {fileID: 0}
- target: {fileID: 5872023843001977328, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3}
propertyPath: m_SizeDelta.x
@@ -39135,7 +39135,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7579783095933529078, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3}
propertyPath: m_Name
- value: Stamp_Diabilities
+ value: Stamp_Disabilities
objectReference: {fileID: 0}
- target: {fileID: 7591921673328099837, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3}
propertyPath: m_LocalPosition.x
@@ -47424,7 +47424,7 @@ PrefabInstance:
m_Modifications:
- target: {fileID: 4857910982681371041, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3}
propertyPath: stampName
- value: Stamp_Financial
+ value:
objectReference: {fileID: 0}
- target: {fileID: 5872023843001977328, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3}
propertyPath: m_SizeDelta.x
diff --git a/SSLR/Assets/Scenes/LiviPlayground.unity b/SSLR/Assets/Scenes/LiviPlayground.unity
index f06387f..79af562 100644
--- a/SSLR/Assets/Scenes/LiviPlayground.unity
+++ b/SSLR/Assets/Scenes/LiviPlayground.unity
@@ -3738,6 +3738,9 @@ MonoBehaviour:
peopleHelpedText: {fileID: 983053282}
accuracyText: {fileID: 912717248}
profilePicture: {fileID: 1277945301}
+ authPanel: {fileID: 0}
+ menuPanel: {fileID: 0}
+ profilePanel: {fileID: 0}
--- !u!1 &387529325
GameObject:
m_ObjectHideFlags: 0
@@ -5659,6 +5662,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
url: https://fchobpauqasfebohuuam.supabase.co
anonKey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImZjaG9icGF1cWFzZmVib2h1dWFtIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MzczNTYyNTUsImV4cCI6MjA1MjkzMjI1NX0.LkwCnzjtf8CPLrm6OONkjyjxZW8jE05V_spbOEeAXEM
+ menuButtons: {fileID: 0}
--- !u!1 &553967502
GameObject:
m_ObjectHideFlags: 0
@@ -7080,80 +7084,6 @@ Transform:
m_CorrespondingSourceObject: {fileID: 8980189677058893101, guid: 0197fe44356b38740b9747f44a27fa94, type: 3}
m_PrefabInstance: {fileID: 1705170805}
m_PrefabAsset: {fileID: 0}
---- !u!1001 &775517552
-PrefabInstance:
- m_ObjectHideFlags: 0
- serializedVersion: 2
- m_Modification:
- serializedVersion: 3
- m_TransformParent: {fileID: 0}
- m_Modifications:
- - target: {fileID: 4857910982681371041, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: stampDoc
- value:
- objectReference: {fileID: 0}
- - target: {fileID: 5866394375878670926, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_IsActive
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 6301000330967166983, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_IsKinematic
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 7579783095933529078, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_Name
- value: Stamp_Financial
- objectReference: {fileID: 0}
- - target: {fileID: 7579783095933529078, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_IsActive
- value: 1
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalPosition.x
- value: 0.5973627
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalPosition.y
- value: 0.8763828
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalPosition.z
- value: 1.5825568
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalRotation.w
- value: 1
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalRotation.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalRotation.y
- value: -0
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalRotation.z
- value: -0
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalEulerAnglesHint.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalEulerAnglesHint.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalEulerAnglesHint.z
- value: 0
- objectReference: {fileID: 0}
- m_RemovedComponents: []
- m_RemovedGameObjects:
- - {fileID: 5866394375878670926, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- m_AddedGameObjects: []
- m_AddedComponents: []
- m_SourcePrefab: {fileID: 100100000, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
--- !u!1 &783080947
GameObject:
m_ObjectHideFlags: 0
@@ -14378,80 +14308,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1341287577}
m_CullTransparentMesh: 1
---- !u!1001 &1351099538
-PrefabInstance:
- m_ObjectHideFlags: 0
- serializedVersion: 2
- m_Modification:
- serializedVersion: 3
- m_TransformParent: {fileID: 0}
- m_Modifications:
- - target: {fileID: 4857910982681371041, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: stampDoc
- value:
- objectReference: {fileID: 0}
- - target: {fileID: 5866394375878670926, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_IsActive
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 6301000330967166983, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_IsKinematic
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 7579783095933529078, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_Name
- value: Stamp_Residential
- objectReference: {fileID: 0}
- - target: {fileID: 7579783095933529078, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_IsActive
- value: 1
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalPosition.x
- value: 0.5973627
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalPosition.y
- value: 0.8763828
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalPosition.z
- value: 1.4515569
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalRotation.w
- value: 1
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalRotation.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalRotation.y
- value: -0
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalRotation.z
- value: -0
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalEulerAnglesHint.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalEulerAnglesHint.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalEulerAnglesHint.z
- value: 0
- objectReference: {fileID: 0}
- m_RemovedComponents: []
- m_RemovedGameObjects:
- - {fileID: 5866394375878670926, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- m_AddedGameObjects: []
- m_AddedComponents: []
- m_SourcePrefab: {fileID: 100100000, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
--- !u!1 &1385095273
GameObject:
m_ObjectHideFlags: 0
@@ -17143,80 +16999,6 @@ RectTransform:
m_AnchoredPosition: {x: -5, y: 0}
m_SizeDelta: {x: -20, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
---- !u!1001 &1682193527
-PrefabInstance:
- m_ObjectHideFlags: 0
- serializedVersion: 2
- m_Modification:
- serializedVersion: 3
- m_TransformParent: {fileID: 0}
- m_Modifications:
- - target: {fileID: 4857910982681371041, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: stampDoc
- value:
- objectReference: {fileID: 0}
- - target: {fileID: 5866394375878670926, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_IsActive
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 6301000330967166983, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_IsKinematic
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 7579783095933529078, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_Name
- value: Stamp_Disabilities
- objectReference: {fileID: 0}
- - target: {fileID: 7579783095933529078, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_IsActive
- value: 1
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalPosition.x
- value: 0.5973627
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalPosition.y
- value: 0.8763828
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalPosition.z
- value: 1.1825569
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalRotation.w
- value: 1
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalRotation.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalRotation.y
- value: -0
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalRotation.z
- value: -0
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalEulerAnglesHint.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalEulerAnglesHint.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalEulerAnglesHint.z
- value: 0
- objectReference: {fileID: 0}
- m_RemovedComponents: []
- m_RemovedGameObjects:
- - {fileID: 5866394375878670926, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- m_AddedGameObjects: []
- m_AddedComponents: []
- m_SourcePrefab: {fileID: 100100000, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
--- !u!1 &1684671710
GameObject:
m_ObjectHideFlags: 0
@@ -20993,80 +20775,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2136281702}
m_CullTransparentMesh: 1
---- !u!1001 &2142814430
-PrefabInstance:
- m_ObjectHideFlags: 0
- serializedVersion: 2
- m_Modification:
- serializedVersion: 3
- m_TransformParent: {fileID: 0}
- m_Modifications:
- - target: {fileID: 4857910982681371041, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: stampDoc
- value:
- objectReference: {fileID: 0}
- - target: {fileID: 5866394375878670926, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_IsActive
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 6301000330967166983, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_IsKinematic
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 7579783095933529078, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_Name
- value: Stamp_DV
- objectReference: {fileID: 0}
- - target: {fileID: 7579783095933529078, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_IsActive
- value: 1
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalPosition.x
- value: 0.5973627
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalPosition.y
- value: 0.8763828
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalPosition.z
- value: 1.317
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalRotation.w
- value: 1
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalRotation.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalRotation.y
- value: -0
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalRotation.z
- value: -0
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalEulerAnglesHint.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalEulerAnglesHint.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 7591921673328099837, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- propertyPath: m_LocalEulerAnglesHint.z
- value: 0
- objectReference: {fileID: 0}
- m_RemovedComponents: []
- m_RemovedGameObjects:
- - {fileID: 5866394375878670926, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
- m_AddedGameObjects: []
- m_AddedComponents: []
- m_SourcePrefab: {fileID: 100100000, guid: e33418fe190c57c4eb17f4c129f32a02, type: 3}
--- !u!1 &2143047714
GameObject:
m_ObjectHideFlags: 0
@@ -21399,10 +21107,6 @@ SceneRoots:
- {fileID: 1453501889}
- {fileID: 387529330}
- {fileID: 725046037}
- - {fileID: 775517552}
- - {fileID: 1351099538}
- - {fileID: 2142814430}
- - {fileID: 1682193527}
- {fileID: 9804468}
- {fileID: 385635438}
- {fileID: 720927110}
diff --git a/SSLR/Assets/Scenes/UiScene.unity b/SSLR/Assets/Scenes/UiScene.unity
index cadb1fa..eadf959 100644
--- a/SSLR/Assets/Scenes/UiScene.unity
+++ b/SSLR/Assets/Scenes/UiScene.unity
@@ -381,6 +381,7 @@ MonoBehaviour:
profilePicture: {fileID: 1616624835}
authPanel: {fileID: 1474701987}
menuPanel: {fileID: 1087504102}
+ profilePanel: {fileID: 1626488804}
--- !u!114 &158339685
MonoBehaviour:
m_ObjectHideFlags: 0
diff --git a/SSLR/Assets/Scripts/Bin.cs b/SSLR/Assets/Scripts/Bin.cs
index 9f59fe9..1f2aa38 100644
--- a/SSLR/Assets/Scripts/Bin.cs
+++ b/SSLR/Assets/Scripts/Bin.cs
@@ -12,15 +12,15 @@ using UnityEngine;
public class Bin : MonoBehaviour
{
+ ///
+ /// Detects the paper object to destroy
+ ///
+ ///
void OnCollisionEnter(Collision collision)
{
if (collision.gameObject.CompareTag("Paper"))
{
Destroy(collision.gameObject);
}
- else
- {
- Debug.Log("you can't throw that!");
- }
}
}
\ No newline at end of file
diff --git a/SSLR/Assets/Scripts/DayManager.cs b/SSLR/Assets/Scripts/DayManager.cs
index da2c35a..c855889 100644
--- a/SSLR/Assets/Scripts/DayManager.cs
+++ b/SSLR/Assets/Scripts/DayManager.cs
@@ -11,14 +11,30 @@ using UnityEngine;
public class DayManager : MonoBehaviour
{
+ ///
+ /// Whether the player has completed the shift
+ ///
public bool doneAShift = false;
+ ///
+ /// Shiftmanager reference
+ ///
[SerializeField] private GameObject shiftManager;
-
- private Collider endDayTrigger;
- private GameManager gm;
private ShiftManager shiftManagerScript;
+
+ ///
+ /// GameManager reference
+ ///
+ private GameManager gm;
+ ///
+ /// Box collider trigger
+ ///
+ private Collider endDayTrigger;
+
+ ///
+ /// Assigning references
+ ///
void Awake()
{
gm = GameObject.Find("Game Manager").GetComponent();
@@ -28,6 +44,9 @@ public class DayManager : MonoBehaviour
endDayTrigger.enabled = false;
}
+ ///
+ /// Check if end day collider activates
+ ///
void Update()
{
if (doneAShift && !endDayTrigger.enabled)
@@ -40,13 +59,17 @@ public class DayManager : MonoBehaviour
}
}
+ ///
+ /// End the day
+ ///
+ ///
void OnTriggerEnter(Collider other)
{
if (other.CompareTag("Player"))
{
Debug.Log("Day completed!");
- Player.daysPlayed += 1;
- Debug.Log(Player.daysPlayed);
+ Backend.instance.User.daysPlayed += 1;
+ Debug.Log(Backend.instance.User.daysPlayed);
shiftManagerScript.AllowShiftStart();
Debug.Log("You can start another shift!");
diff --git a/SSLR/Assets/Scripts/Door.cs b/SSLR/Assets/Scripts/Door.cs
index 5295990..55523ec 100644
--- a/SSLR/Assets/Scripts/Door.cs
+++ b/SSLR/Assets/Scripts/Door.cs
@@ -12,16 +12,24 @@ using UnityEngine;
public class Door : MonoBehaviour
{
///
- /// References and variables
+ /// Gamemanager reference
///
private GameManager gm;
+ ///
+ /// Door pivots variables
+ ///
[SerializeField] private GameObject doorLeft;
[SerializeField] private GameObject doorRight;
+
///
/// a value to control delay the door closing
///
public float doorCloseDelay = 0.75f;
+
+ ///
+ /// Whether door is opened
+ ///
private bool doorOpened = false;
///
diff --git a/SSLR/Assets/Scripts/EmergencyButton.cs b/SSLR/Assets/Scripts/EmergencyButton.cs
index 66f27ba..d17efd5 100644
--- a/SSLR/Assets/Scripts/EmergencyButton.cs
+++ b/SSLR/Assets/Scripts/EmergencyButton.cs
@@ -1,3 +1,10 @@
+/*
+ * Author:Lin Hengrui Ryan
+ * Date: 10/2/25
+ * Description:
+ * Emergency button function
+ */
+
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
diff --git a/SSLR/Assets/Scripts/GameManager.cs b/SSLR/Assets/Scripts/GameManager.cs
index dc4fc31..858ca82 100644
--- a/SSLR/Assets/Scripts/GameManager.cs
+++ b/SSLR/Assets/Scripts/GameManager.cs
@@ -24,7 +24,7 @@ public class GameManager : MonoBehaviour
public bool shiftStarted;
///
- /// NPC in front of desk
+ /// NPC in front of desk and answer
///
public GameObject currentNPC;
public string currentNPCCorrectDepartment;
diff --git a/SSLR/Assets/Scripts/MenuButtons.cs b/SSLR/Assets/Scripts/MenuButtons.cs
index 550470e..92ab78f 100644
--- a/SSLR/Assets/Scripts/MenuButtons.cs
+++ b/SSLR/Assets/Scripts/MenuButtons.cs
@@ -1,3 +1,10 @@
+/*
+ * Author: Livinia Poo
+ * Date: 15/2/25
+ * Description:
+ * Main Menu scene button interactions
+ */
+
using System.Collections;
using System.Collections.Generic;
using Supabase.Gotrue;
@@ -53,6 +60,10 @@ public class MenuButtons : MonoBehaviour
}
}
+ ///
+ /// Update profile data based on logged in user
+ ///
+ ///
public void UpdateProfileUI(Users user)
{
if (user != null)
@@ -75,24 +86,35 @@ public class MenuButtons : MonoBehaviour
}
}
+ ///
+ /// Calling backend to log player out
+ ///
public void Logout()
{
Backend.instance.SignOut();
}
+ ///
+ /// Calling backend to get user profile image
+ ///
public void GetProfilePicture()
{
- // profilePicture.sprite = Backend.instance.GetProfilePicture("https://fchobpauqasfebohuuam.supabase.co/storage/v1/object/public/Avatar//1739708594780-6156448458035283230_120.jpg");
-
if (Backend.instance.User != null && !string.IsNullOrEmpty(Backend.instance.User.profilePictureUrl))
Backend.instance.GetProfile(Backend.instance.User.profilePictureUrl, profilePicture);
}
+ ///
+ /// Load scene
+ ///
+ ///
public void LoadScene(string scene)
{
SceneManager.LoadScene(scene);
}
+ ///
+ /// Close game
+ ///
public void QuitGame()
{
Application.Quit();
diff --git a/SSLR/Assets/Scripts/NPCMovementRework.cs b/SSLR/Assets/Scripts/NPCMovementRework.cs
index 8a63a09..ae176a3 100644
--- a/SSLR/Assets/Scripts/NPCMovementRework.cs
+++ b/SSLR/Assets/Scripts/NPCMovementRework.cs
@@ -5,7 +5,6 @@
* Customer walking handling using NavMesh
*/
-
using System.Collections;
using UnityEngine;
using UnityEngine.AI;
@@ -18,10 +17,16 @@ public class NpcMovementRework : MonoBehaviour
///
public NavMeshAgent agent;
+ ///
+ /// Animation assigning
+ ///
public Animator animator;
private static readonly int IsSitting = Animator.StringToHash("isSitting");
private static readonly int Speed = Animator.StringToHash("Speed");
+ ///
+ /// NPC's dialogue variables
+ ///
public TextMeshProUGUI npcWelcomeText;
public TextMeshProUGUI initialStatementText;
public TextMeshProUGUI npcAnswerOneText;
@@ -32,9 +37,19 @@ public class NpcMovementRework : MonoBehaviour
[SerializeField] private GameObject npcSpeechBubble;
[SerializeField] private GameObject npcAnswerPanel;
+ ///
+ /// NPC Data referemce
+ ///
public NpcData npcData;
+
+ ///
+ /// Variable to store service
+ ///
public string correctService;
+ ///
+ /// Check if NPC should be sitting or standing
+ ///
public void Update()
{
if (agent.velocity.magnitude > 0.1)
@@ -48,6 +63,9 @@ public class NpcMovementRework : MonoBehaviour
}
}
+ ///
+ /// Assigning references, NPC movement
+ ///
public void Start()
{
agent = gameObject.GetComponent();
@@ -59,11 +77,18 @@ public class NpcMovementRework : MonoBehaviour
StartCoroutine(SitDown());
}
+ ///
+ /// Call coroutine to call client
+ ///
public void Called()
{
StartCoroutine(CustomerCalled());
}
+ ///
+ /// Coroutine to get NPC to coe to table
+ ///
+ ///
public IEnumerator CustomerCalled()
{
var pos = NpcManager.instance.desk;
@@ -99,6 +124,10 @@ public class NpcMovementRework : MonoBehaviour
}
+ ///
+ /// If in front of seat, NPC sits
+ ///
+ ///
public IEnumerator SitDown()
{
var i = Random.Range(0, NpcManager.instance.Seats.Length);
@@ -132,6 +161,10 @@ public class NpcMovementRework : MonoBehaviour
}
+ ///
+ /// Despawning NPCs
+ ///
+ ///
public void Despawn(bool endDay = false)
{
if (endDay)
@@ -146,6 +179,11 @@ public class NpcMovementRework : MonoBehaviour
}
}
+ ///
+ /// Only despawn under certain condition
+ ///
+ ///
+ ///
private IEnumerator DespawnWhenReached(Transform destination)
{
agent.SetDestination(destination.position);
@@ -164,6 +202,9 @@ public class NpcMovementRework : MonoBehaviour
}
+ ///
+ /// Assign UI text based on NPC Data
+ ///
public void LoadNPCDialogue()
{
if (GameManager.instance.currentNPC != this.gameObject)
diff --git a/SSLR/Assets/Scripts/NextButton.cs b/SSLR/Assets/Scripts/NextButton.cs
index e569c3d..b2d116a 100644
--- a/SSLR/Assets/Scripts/NextButton.cs
+++ b/SSLR/Assets/Scripts/NextButton.cs
@@ -1,3 +1,10 @@
+/*
+ * Author: Lin Hengrui Ryan, Livinia Poo
+ * Date: 15/2/25
+ * Description:
+ * Calling and assigning new npc
+ */
+
using UnityEngine;
public class NextButton : MonoBehaviour
diff --git a/SSLR/Assets/Scripts/NpcManager.cs b/SSLR/Assets/Scripts/NpcManager.cs
index 8cae3a1..705b610 100644
--- a/SSLR/Assets/Scripts/NpcManager.cs
+++ b/SSLR/Assets/Scripts/NpcManager.cs
@@ -48,9 +48,11 @@ public class NpcManager : MonoBehaviour
///
[SerializeField] private float npcBufferTime;
+ ///
+ /// List of seats for NPCs in scene
+ ///
public Seat[] Seats;
-
-
+
///
/// collection of all exiting npcs
///
diff --git a/SSLR/Assets/Scripts/PaperSocket.cs b/SSLR/Assets/Scripts/PaperSocket.cs
index f785ed4..c7a1471 100644
--- a/SSLR/Assets/Scripts/PaperSocket.cs
+++ b/SSLR/Assets/Scripts/PaperSocket.cs
@@ -2,7 +2,7 @@
* Author: Livinia Poo
* Date: 1/2/25
* Description:
- * Paper Handling Interaction
+ * Paper Socket Logic
*/
using System.Collections;
@@ -13,26 +13,42 @@ using UnityEngine.XR.Interaction.Toolkit.Interactors;
public class PaperSocket : MonoBehaviour
{
+ ///
+ /// Variables
+ ///
[SerializeField] private string socketName;
XRSocketInteractor interactor;
+ ///
+ /// Assigning variables
+ ///
void Awake()
{
interactor = GetComponent();
}
+ ///
+ /// Adding listeners
+ ///
void OnEnable()
{
interactor.selectEntered.AddListener(OnPaperAttached);
interactor.selectExited.AddListener(OnPaperDetached);
}
+ ///
+ /// Removing listeners
+ ///
void OnDisable()
{
interactor.selectEntered.RemoveListener(OnPaperAttached);
interactor.selectExited.RemoveListener(OnPaperDetached);
}
+ ///
+ /// Attached logic
+ ///
+ ///
private void OnPaperAttached(SelectEnterEventArgs args)
{
GameObject paperObject = args.interactableObject.transform.gameObject;
@@ -62,6 +78,10 @@ public class PaperSocket : MonoBehaviour
}
}
+ ///
+ /// Removed logic
+ ///
+ ///
private void OnPaperDetached(SelectExitEventArgs args)
{
if (socketName == "Paper Socket_NPC")
diff --git a/SSLR/Assets/Scripts/PaperSpawn.cs b/SSLR/Assets/Scripts/PaperSpawn.cs
index d3f7a8c..bdc1aa8 100644
--- a/SSLR/Assets/Scripts/PaperSpawn.cs
+++ b/SSLR/Assets/Scripts/PaperSpawn.cs
@@ -1,3 +1,10 @@
+/*
+ * Author: Livinia Poo
+ * Date: 12/2/25
+ * Description:
+ * Spawning paper in area
+ */
+
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
@@ -8,12 +15,22 @@ using UnityEngine.XR;
public class PaperSpawn : MonoBehaviour
{
+ ///
+ /// What to spawn
+ ///
[SerializeField] private GameObject paperPrefab;
+
+ ///
+ /// Player's hands/Controllers
+ ///
private XRDirectInteractor playerHand;
private bool handInPaperSpawn = false;
private InputDevice targetDevice;
+ ///
+ /// Assigning hand
+ ///
void Start()
{
List devices = new List();
@@ -29,6 +46,10 @@ public class PaperSpawn : MonoBehaviour
}
}
+ ///
+ /// Detecting player hand
+ ///
+ ///
void OnTriggerEnter(Collider other)
{
if (other.CompareTag("PlayerHand"))
@@ -38,6 +59,10 @@ public class PaperSpawn : MonoBehaviour
}
}
+ ///
+ /// Detecting player hand leave area
+ ///
+ ///
void OnTriggerExit(Collider other)
{
if (other.CompareTag("PlayerHand"))
@@ -47,6 +72,9 @@ public class PaperSpawn : MonoBehaviour
}
}
+ ///
+ /// Spawn paper if in trigger and grabbing
+ ///
void Update()
{
if (handInPaperSpawn && playerHand != null && !playerHand.hasSelection)
@@ -61,6 +89,9 @@ public class PaperSpawn : MonoBehaviour
}
}
+ ///
+ /// Instantiate paper object
+ ///
void SpawnPaper()
{
GameObject spawnedPaper = Instantiate(paperPrefab, playerHand.transform.position, Quaternion.identity);
diff --git a/SSLR/Assets/Scripts/PenInteractor.cs b/SSLR/Assets/Scripts/PenInteractor.cs
index 500b55e..7e37ec9 100644
--- a/SSLR/Assets/Scripts/PenInteractor.cs
+++ b/SSLR/Assets/Scripts/PenInteractor.cs
@@ -1,7 +1,8 @@
/*
* Author: Shannon Goh and Livinia Poo
* Date: 03/02/2025
-* Description: Pen Interactor Handle script
+* Description:
+* Pen Interactor Handle script
*/
@@ -12,8 +13,15 @@ using UnityEngine.XR.Interaction.Toolkit;
using UnityEngine.XR.Interaction.Toolkit.Interactors;
public class PenInteractor : MonoBehaviour
{
+ ///
+ /// Document script reference
+ ///
private StampDocument stampDocScript;
+ ///
+ /// Sign when pen touches area
+ ///
+ ///
private void OnCollisionEnter(Collision collision)
{
if (PenSocketInteractor.isPickedUp && collision.gameObject.CompareTag("Paper"))
diff --git a/SSLR/Assets/Scripts/PenSocketInteractor.cs b/SSLR/Assets/Scripts/PenSocketInteractor.cs
index 00b12c7..d1b5a60 100644
--- a/SSLR/Assets/Scripts/PenSocketInteractor.cs
+++ b/SSLR/Assets/Scripts/PenSocketInteractor.cs
@@ -1,7 +1,8 @@
/*
* Author: Shannon Goh
* Date: 03/02/2025
-* Description: Pen Socket Interactor Handle script
+* Description:
+* Pen Socket Interactor Handle script
*/
@@ -14,35 +15,53 @@ using UnityEngine.XR.Interaction.Toolkit.Interactors;
public class PenSocketInteractor : MonoBehaviour
{
+ ///
+ /// Pen set up
+ ///
XRSocketInteractor penSocket;
public static bool isPickedUp = false;
-
+
+ ///
+ /// Assigning pen socket
+ ///
private void Awake()
{
penSocket = GetComponent();
}
+ ///
+ /// Adding listeners
+ ///
void OnEnable()
{
penSocket.selectEntered.AddListener(OnPenPlaced);
penSocket.selectExited.AddListener(OnPenPickedUp);
}
+ ///
+ /// Removing listeners
+ ///
void OnDisable()
{
penSocket.selectEntered.RemoveListener(OnPenPlaced);
penSocket.selectExited.RemoveListener(OnPenPickedUp);
}
+ ///
+ /// Declare that pen is picked up
+ ///
+ ///
private void OnPenPickedUp(SelectExitEventArgs args)
{
isPickedUp = true;
- Debug.Log("Pen picked up");
}
+ ///
+ /// Declare pen is returned back
+ ///
+ ///
private void OnPenPlaced(SelectEnterEventArgs args)
{
isPickedUp = false;
- Debug.Log("Pen placed back");
}
}
diff --git a/SSLR/Assets/Scripts/PlayerDialogueInteraction.cs b/SSLR/Assets/Scripts/PlayerDialogueInteraction.cs
index 985e503..242a2b1 100644
--- a/SSLR/Assets/Scripts/PlayerDialogueInteraction.cs
+++ b/SSLR/Assets/Scripts/PlayerDialogueInteraction.cs
@@ -1,6 +1,6 @@
/*
* Author: Livinia Poo
- * Date: 1/2/25
+ * Date: 16/2/25
* Description:
* Dialogue Interaction (Player side)
*/
@@ -12,6 +12,9 @@ using UnityEngine;
public class PlayerDialogueInteraction : MonoBehaviour
{
+ ///
+ /// Dialogue instance
+ ///
public static PlayerDialogueInteraction instance;
///
@@ -49,6 +52,9 @@ public class PlayerDialogueInteraction : MonoBehaviour
public GameObject sgEnableServiceButton;
public StampDocument currentDocument;
+ ///
+ /// Do not destroy on load, and resetting UI
+ ///
void Awake()
{
if (instance == null)
@@ -64,6 +70,9 @@ public class PlayerDialogueInteraction : MonoBehaviour
ResetChecklist();
}
+ ///
+ /// Clear and disable dialogues
+ ///
public void ResetDialogue()
{
playerDialogue.SetActive(false);
@@ -77,6 +86,9 @@ public class PlayerDialogueInteraction : MonoBehaviour
question3Asked = false;
}
+ ///
+ /// Clearing checklist
+ ///
public void ResetChecklist()
{
welcomeTick.SetActive(false);
@@ -86,6 +98,12 @@ public class PlayerDialogueInteraction : MonoBehaviour
takeDocumentsTick.SetActive(false);
}
+ ///
+ /// Assigning UI text from npcData
+ ///
+ ///
+ ///
+ ///
public void SetPlayerQuestions(string q1, string q2, string q3)
{
playerQuestionOneText.text = q1;
@@ -93,11 +111,18 @@ public class PlayerDialogueInteraction : MonoBehaviour
playerQuestionThreeText.text = q3;
}
+ ///
+ /// Assigning UI text from npcData
+ ///
+ ///
public void SetPlayerResposne(string response)
{
playerResponseText.text = response;
}
+ ///
+ /// Logic after weloming NPC
+ ///
public void WelcomePressed()
{
questionPanel.SetActive(true);
@@ -108,6 +133,10 @@ public class PlayerDialogueInteraction : MonoBehaviour
GameManager.instance.currentNPC.GetComponent().initialStatementText.gameObject.SetActive(true);
}
+ ///
+ /// Logic for each question asked
+ ///
+ ///
public void OnQuestionSelected(int questionIndex)
{
if (questionIndex == 1)
@@ -144,6 +173,9 @@ public class PlayerDialogueInteraction : MonoBehaviour
CheckAllQuestionsAsked();
}
+ ///
+ /// Ticks checklist after asking questions at least once
+ ///
void CheckAllQuestionsAsked()
{
if (question1Asked && question2Asked && question3Asked)
@@ -152,6 +184,9 @@ public class PlayerDialogueInteraction : MonoBehaviour
}
}
+ ///
+ /// Logic for responding to NPC question
+ ///
public void OnResponseSelected()
{
questionPanel.SetActive(true);
@@ -163,6 +198,11 @@ public class PlayerDialogueInteraction : MonoBehaviour
GameManager.instance.currentNPC.GetComponent().npcAnswerThreeText.gameObject.SetActive(false);
GameManager.instance.currentNPC.GetComponent().npcClarifiedResponse.gameObject.SetActive(true);
}
+
+ ///
+ /// Sign paper correct signature and close services
+ ///
+ ///
public void OnServiceSelected(string service)
{
servicesPanel.SetActive(false);
diff --git a/SSLR/Assets/Scripts/ShiftManager.cs b/SSLR/Assets/Scripts/ShiftManager.cs
index d2c3cae..a357084 100644
--- a/SSLR/Assets/Scripts/ShiftManager.cs
+++ b/SSLR/Assets/Scripts/ShiftManager.cs
@@ -11,14 +11,31 @@ using UnityEngine;
public class ShiftManager : MonoBehaviour
{
+ ///
+ /// Shift details
+ ///
[SerializeField] private float shiftDuration;
private float remainingTime;
[SerializeField] private GameObject npcSpawnArea;
+ ///
+ /// Shift box collider trigger
+ ///
private Collider shiftTrigger;
+
+ ///
+ /// Gamemanager reference
+ ///
private GameManager gm;
+
+ ///
+ /// Day manager reference
+ ///
private DayManager dayManager;
+ ///
+ /// Assigning variables and references
+ ///
void Awake()
{
gm = GameObject.Find("Game Manager").GetComponent();
@@ -30,6 +47,10 @@ public class ShiftManager : MonoBehaviour
shiftTrigger = GetComponent();
}
+ ///
+ /// Start shift on trigger
+ ///
+ ///
void OnTriggerEnter(Collider other)
{
if (other.CompareTag("Player") && !gm.shiftStarted)
@@ -43,6 +64,10 @@ public class ShiftManager : MonoBehaviour
}
}
+ ///
+ /// Timer to count down shift end
+ ///
+ ///
IEnumerator StartWorkShift()
{
while (remainingTime > 0)
@@ -61,6 +86,9 @@ public class ShiftManager : MonoBehaviour
EndShift();
}
+ ///
+ /// Stop all shift-related logic
+ ///
void EndShift()
{
Debug.Log("Shift ended!");
@@ -72,6 +100,9 @@ public class ShiftManager : MonoBehaviour
NpcManager.instance.EndDay();
}
+ ///
+ /// Start next day shift
+ ///
public void AllowShiftStart()
{
shiftTrigger.enabled = true;
diff --git a/SSLR/Assets/Scripts/StampDocument.cs b/SSLR/Assets/Scripts/StampDocument.cs
index e28ba0a..6ab60fd 100644
--- a/SSLR/Assets/Scripts/StampDocument.cs
+++ b/SSLR/Assets/Scripts/StampDocument.cs
@@ -1,3 +1,10 @@
+/*
+ * Author: Livinia Poo
+ * Date: 13/2/25
+ * Description:
+ * Document Logic
+ */
+
using System;
using System.Collections;
using System.Collections.Generic;
@@ -5,15 +12,15 @@ using UnityEngine;
public class StampDocument : MonoBehaviour
{
- [Header("Stamps")] [SerializeField] private GameObject financialStamp;
+ [Header("Stamps")]
+ [SerializeField] private GameObject financialStamp;
[SerializeField] private GameObject residentialStamp;
[SerializeField] private GameObject dvStamp;
[SerializeField] private GameObject disabilitiesStamp;
[SerializeField] private GameObject signature;
- [Header("Signatures")] [SerializeField]
- private GameObject comcareSignature;
-
+ [Header("Signatures")]
+ [SerializeField] private GameObject comcareSignature;
[SerializeField] private GameObject fscSignature;
[SerializeField] private GameObject peersSignature;
[SerializeField] private GameObject transitionalShelterSignature;
@@ -21,14 +28,26 @@ public class StampDocument : MonoBehaviour
[SerializeField] private GameObject childrenYoungHomeSignature;
[SerializeField] private GameObject sgEnableSignature;
+ ///
+ /// Details to reference later on
+ ///
public bool isStamped;
public bool isSigned;
public string assignedDepartment;
public string assignedService;
+
+ ///
+ /// See finalised document detail
+ ///
+ ///
private string CheckFinalDepartment()
{
return $"{assignedDepartment}-{assignedService}";
}
+
+ ///
+ /// Disabling all signatures and samps
+ ///
void Start()
{
financialStamp.SetActive(false);
@@ -49,6 +68,9 @@ public class StampDocument : MonoBehaviour
isStamped = false;
}
+ ///
+ /// Financial stamp appear, assign department and declare stamped
+ ///
public void StampFinancial()
{
financialStamp.SetActive(true);
@@ -56,6 +78,9 @@ public class StampDocument : MonoBehaviour
assignedDepartment = "Financial";
}
+ ///
+ /// Residential stamp appear, assign department and declare stamped
+ ///
public void StampResidential()
{
residentialStamp.SetActive(true);
@@ -63,6 +88,9 @@ public class StampDocument : MonoBehaviour
assignedDepartment = "Residential";
}
+ ///
+ /// DV stamp appear, assign department and declare stamped
+ ///
public void StampDV()
{
dvStamp.SetActive(true);
@@ -70,6 +98,9 @@ public class StampDocument : MonoBehaviour
assignedDepartment = "Domestic Violence";
}
+ ///
+ /// Disabilities stamp appear, assign department and declare stamped
+ ///
public void StampDisabilities()
{
disabilitiesStamp.SetActive(true);
@@ -77,6 +108,9 @@ public class StampDocument : MonoBehaviour
assignedDepartment = "Disabilities";
}
+ ///
+ /// Respectivee signature appear, assign servoce and declare signed
+ ///
public void Sign(string service)
{
switch (service)
@@ -128,6 +162,10 @@ public class StampDocument : MonoBehaviour
}
+ ///
+ /// Declares this is current document
+ ///
+ ///
private void OnTriggerEnter(Collider other)
{
if (other.gameObject.CompareTag("Pen"))
diff --git a/SSLR/Assets/Scripts/StampInteractor.cs b/SSLR/Assets/Scripts/StampInteractor.cs
index 5e5f872..54ff0d1 100644
--- a/SSLR/Assets/Scripts/StampInteractor.cs
+++ b/SSLR/Assets/Scripts/StampInteractor.cs
@@ -1,3 +1,11 @@
+/*
+ * Author: Yeo Sai Puay and Livinia Poo
+ * Date: 3/2/25
+ * Description:
+ * Stamp Logic
+ */
+
+
using System;
using System.Collections;
using System.Collections.Generic;
@@ -5,15 +13,28 @@ using UnityEngine;
public class StampInteractor : MonoBehaviour
{
+ ///
+ /// Name of the stam[
+ ///
public string stampName;
+ ///
+ /// StampDoc reference
+ ///
private StampDocument stampDocScript;
+ ///
+ /// Assigning name of stamp
+ ///
void Awake()
{
stampName = gameObject.name;
}
+ ///
+ /// Stamping correct department on collision
+ ///
+ ///
private void OnCollisionEnter(Collision collision)
{
if (StampSocketInteractor.isHeld && collision.gameObject.CompareTag("Paper"))
diff --git a/SSLR/Assets/Scripts/StampSocketInteractor.cs b/SSLR/Assets/Scripts/StampSocketInteractor.cs
index 01ce55a..26af660 100644
--- a/SSLR/Assets/Scripts/StampSocketInteractor.cs
+++ b/SSLR/Assets/Scripts/StampSocketInteractor.cs
@@ -1,3 +1,11 @@
+/*
+ * Author: Yeo Sai Puay
+ * Date: 3/2/25
+ * Description:
+ * Stamp Socket Interactor Handle script
+ */
+
+
using System;
using System.Collections;
using System.Collections.Generic;
@@ -7,39 +15,54 @@ using UnityEngine.XR.Interaction.Toolkit.Interactors;
public class StampSocketInteractor : MonoBehaviour
{
+ ///
+ /// Stamp set up
+ ///
XRSocketInteractor stampSocket;
public static bool isHeld = false;
-
+ ///
+ /// Assigning stamp socket
+ ///
private void Awake()
{
stampSocket = GetComponent();
}
+ ///
+ /// Assigning listeners
+ ///
void OnEnable()
{
stampSocket.selectEntered.AddListener(OnStampTable);
stampSocket.selectExited.AddListener(OnStampHeld);
}
+ ///
+ /// Removing listeners
+ ///
private void OnDisable()
{
stampSocket.selectEntered.RemoveListener(OnStampTable);
stampSocket.selectExited.RemoveListener(OnStampHeld);
}
-
+ ///
+ /// Declare stamp is being held by player
+ ///
+ ///
private void OnStampHeld(SelectExitEventArgs args)
{
isHeld = true;
- Debug.Log("Stamp is held");
- /*Debug.Log(isHeld.ToString());*/
}
+ ///
+ /// Declare stamp is back in socket
+ ///
+ ///
private void OnStampTable(SelectEnterEventArgs args)
{
isHeld = false;
- Debug.Log("Stamp is on table");
}
}
diff --git a/SSLR/Assets/Scripts/UIFacePlayer.cs b/SSLR/Assets/Scripts/UIFacePlayer.cs
index eb02bfb..fdd2d4b 100644
--- a/SSLR/Assets/Scripts/UIFacePlayer.cs
+++ b/SSLR/Assets/Scripts/UIFacePlayer.cs
@@ -11,8 +11,14 @@ using UnityEngine;
public class UIFacePlayer : MonoBehaviour
{
+ ///
+ /// Referencinig player's cam
+ ///
public Transform playerCam;
+ ///
+ /// Player's cam details
+ ///
void Start()
{
if (Camera.main != null)
@@ -21,6 +27,9 @@ public class UIFacePlayer : MonoBehaviour
}
}
+ ///
+ /// UI will always face player
+ ///
void Update()
{
if (playerCam != null && Vector3.Distance(transform.position, playerCam.position) < 2)
diff --git a/SSLR/Assets/Scripts/supabaseClasses.cs b/SSLR/Assets/Scripts/supabaseClasses.cs
index b9285e8..b5e7741 100644
--- a/SSLR/Assets/Scripts/supabaseClasses.cs
+++ b/SSLR/Assets/Scripts/supabaseClasses.cs
@@ -1,3 +1,11 @@
+/*
+ * Author: Lin Hengrui Ryan
+ * Date: 23/1/25
+ * Description:
+ * Document Logic
+ */
+
+
using Postgrest.Attributes;
using Postgrest.Models;