game: XML comments

This commit is contained in:
kookiekenobi 2025-02-17 19:23:05 +08:00
parent 89668fb098
commit dc165532e5
23 changed files with 400 additions and 337 deletions

View file

@ -14949,7 +14949,7 @@ PrefabInstance:
m_Modifications: m_Modifications:
- target: {fileID: 4857910982681371041, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} - target: {fileID: 4857910982681371041, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3}
propertyPath: stampName propertyPath: stampName
value: Stamp_DV value:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5872023843001977328, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} - target: {fileID: 5872023843001977328, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3}
propertyPath: m_SizeDelta.x propertyPath: m_SizeDelta.x
@ -15176,7 +15176,7 @@ PrefabInstance:
m_Modifications: m_Modifications:
- target: {fileID: 4857910982681371041, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} - target: {fileID: 4857910982681371041, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3}
propertyPath: stampName propertyPath: stampName
value: Stamp_Residential value:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5872023843001977328, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} - target: {fileID: 5872023843001977328, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3}
propertyPath: m_SizeDelta.x propertyPath: m_SizeDelta.x
@ -39111,7 +39111,7 @@ PrefabInstance:
m_Modifications: m_Modifications:
- target: {fileID: 4857910982681371041, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} - target: {fileID: 4857910982681371041, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3}
propertyPath: stampName propertyPath: stampName
value: Stamp_Disabilities value:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5872023843001977328, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} - target: {fileID: 5872023843001977328, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3}
propertyPath: m_SizeDelta.x propertyPath: m_SizeDelta.x
@ -39135,7 +39135,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7579783095933529078, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} - target: {fileID: 7579783095933529078, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3}
propertyPath: m_Name propertyPath: m_Name
value: Stamp_Diabilities value: Stamp_Disabilities
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7591921673328099837, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} - target: {fileID: 7591921673328099837, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
@ -47424,7 +47424,7 @@ PrefabInstance:
m_Modifications: m_Modifications:
- target: {fileID: 4857910982681371041, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} - target: {fileID: 4857910982681371041, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3}
propertyPath: stampName propertyPath: stampName
value: Stamp_Financial value:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5872023843001977328, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3} - target: {fileID: 5872023843001977328, guid: bc7aab643b4d1ae4cadc4b6abba2b349, type: 3}
propertyPath: m_SizeDelta.x propertyPath: m_SizeDelta.x

View file

@ -3738,6 +3738,9 @@ MonoBehaviour:
peopleHelpedText: {fileID: 983053282} peopleHelpedText: {fileID: 983053282}
accuracyText: {fileID: 912717248} accuracyText: {fileID: 912717248}
profilePicture: {fileID: 1277945301} profilePicture: {fileID: 1277945301}
authPanel: {fileID: 0}
menuPanel: {fileID: 0}
profilePanel: {fileID: 0}
--- !u!1 &387529325 --- !u!1 &387529325
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -5659,6 +5662,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}
--- !u!1 &553967502 --- !u!1 &553967502
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -7080,80 +7084,6 @@ Transform:
m_CorrespondingSourceObject: {fileID: 8980189677058893101, guid: 0197fe44356b38740b9747f44a27fa94, type: 3} m_CorrespondingSourceObject: {fileID: 8980189677058893101, guid: 0197fe44356b38740b9747f44a27fa94, type: 3}
m_PrefabInstance: {fileID: 1705170805} m_PrefabInstance: {fileID: 1705170805}
m_PrefabAsset: {fileID: 0} 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 --- !u!1 &783080947
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -14378,80 +14308,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1341287577} m_GameObject: {fileID: 1341287577}
m_CullTransparentMesh: 1 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 --- !u!1 &1385095273
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -17143,80 +16999,6 @@ RectTransform:
m_AnchoredPosition: {x: -5, y: 0} m_AnchoredPosition: {x: -5, y: 0}
m_SizeDelta: {x: -20, y: 0} m_SizeDelta: {x: -20, y: 0}
m_Pivot: {x: 0.5, y: 0.5} 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 --- !u!1 &1684671710
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -20993,80 +20775,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2136281702} m_GameObject: {fileID: 2136281702}
m_CullTransparentMesh: 1 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 --- !u!1 &2143047714
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -21399,10 +21107,6 @@ SceneRoots:
- {fileID: 1453501889} - {fileID: 1453501889}
- {fileID: 387529330} - {fileID: 387529330}
- {fileID: 725046037} - {fileID: 725046037}
- {fileID: 775517552}
- {fileID: 1351099538}
- {fileID: 2142814430}
- {fileID: 1682193527}
- {fileID: 9804468} - {fileID: 9804468}
- {fileID: 385635438} - {fileID: 385635438}
- {fileID: 720927110} - {fileID: 720927110}

View file

@ -381,6 +381,7 @@ MonoBehaviour:
profilePicture: {fileID: 1616624835} profilePicture: {fileID: 1616624835}
authPanel: {fileID: 1474701987} authPanel: {fileID: 1474701987}
menuPanel: {fileID: 1087504102} menuPanel: {fileID: 1087504102}
profilePanel: {fileID: 1626488804}
--- !u!114 &158339685 --- !u!114 &158339685
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View file

@ -12,15 +12,15 @@ using UnityEngine;
public class Bin : MonoBehaviour public class Bin : MonoBehaviour
{ {
/// <summary>
/// Detects the paper object to destroy
/// </summary>
/// <param name="collision"></param>
void OnCollisionEnter(Collision collision) void OnCollisionEnter(Collision collision)
{ {
if (collision.gameObject.CompareTag("Paper")) if (collision.gameObject.CompareTag("Paper"))
{ {
Destroy(collision.gameObject); Destroy(collision.gameObject);
} }
else
{
Debug.Log("you can't throw that!");
}
} }
} }

View file

@ -11,14 +11,30 @@ using UnityEngine;
public class DayManager : MonoBehaviour public class DayManager : MonoBehaviour
{ {
/// <summary>
/// Whether the player has completed the shift
/// </summary>
public bool doneAShift = false; public bool doneAShift = false;
/// <summary>
/// Shiftmanager reference
/// </summary>
[SerializeField] private GameObject shiftManager; [SerializeField] private GameObject shiftManager;
private Collider endDayTrigger;
private GameManager gm;
private ShiftManager shiftManagerScript; private ShiftManager shiftManagerScript;
/// <summary>
/// GameManager reference
/// </summary>
private GameManager gm;
/// <summary>
/// Box collider trigger
/// </summary>
private Collider endDayTrigger;
/// <summary>
/// Assigning references
/// </summary>
void Awake() void Awake()
{ {
gm = GameObject.Find("Game Manager").GetComponent<GameManager>(); gm = GameObject.Find("Game Manager").GetComponent<GameManager>();
@ -28,6 +44,9 @@ public class DayManager : MonoBehaviour
endDayTrigger.enabled = false; endDayTrigger.enabled = false;
} }
/// <summary>
/// Check if end day collider activates
/// </summary>
void Update() void Update()
{ {
if (doneAShift && !endDayTrigger.enabled) if (doneAShift && !endDayTrigger.enabled)
@ -40,13 +59,17 @@ public class DayManager : MonoBehaviour
} }
} }
/// <summary>
/// End the day
/// </summary>
/// <param name="other"></param>
void OnTriggerEnter(Collider other) void OnTriggerEnter(Collider other)
{ {
if (other.CompareTag("Player")) if (other.CompareTag("Player"))
{ {
Debug.Log("Day completed!"); Debug.Log("Day completed!");
Player.daysPlayed += 1; Backend.instance.User.daysPlayed += 1;
Debug.Log(Player.daysPlayed); Debug.Log(Backend.instance.User.daysPlayed);
shiftManagerScript.AllowShiftStart(); shiftManagerScript.AllowShiftStart();
Debug.Log("You can start another shift!"); Debug.Log("You can start another shift!");

View file

@ -12,16 +12,24 @@ using UnityEngine;
public class Door : MonoBehaviour public class Door : MonoBehaviour
{ {
/// <summary> /// <summary>
/// References and variables /// Gamemanager reference
/// </summary> /// </summary>
private GameManager gm; private GameManager gm;
/// <summary>
/// Door pivots variables
/// </summary>
[SerializeField] private GameObject doorLeft; [SerializeField] private GameObject doorLeft;
[SerializeField] private GameObject doorRight; [SerializeField] private GameObject doorRight;
/// <summary> /// <summary>
/// a value to control delay the door closing /// a value to control delay the door closing
/// </summary> /// </summary>
public float doorCloseDelay = 0.75f; public float doorCloseDelay = 0.75f;
/// <summary>
/// Whether door is opened
/// </summary>
private bool doorOpened = false; private bool doorOpened = false;
/// <summary> /// <summary>

View file

@ -1,3 +1,10 @@
/*
* Author:Lin Hengrui Ryan
* Date: 10/2/25
* Description:
* Emergency button function
*/
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;

View file

@ -24,7 +24,7 @@ public class GameManager : MonoBehaviour
public bool shiftStarted; public bool shiftStarted;
/// <summary> /// <summary>
/// NPC in front of desk /// NPC in front of desk and answer
/// </summary> /// </summary>
public GameObject currentNPC; public GameObject currentNPC;
public string currentNPCCorrectDepartment; public string currentNPCCorrectDepartment;

View file

@ -1,3 +1,10 @@
/*
* Author: Livinia Poo
* Date: 15/2/25
* Description:
* Main Menu scene button interactions
*/
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using Supabase.Gotrue; using Supabase.Gotrue;
@ -53,6 +60,10 @@ public class MenuButtons : MonoBehaviour
} }
} }
/// <summary>
/// Update profile data based on logged in user
/// </summary>
/// <param name="user"></param>
public void UpdateProfileUI(Users user) public void UpdateProfileUI(Users user)
{ {
if (user != null) if (user != null)
@ -75,24 +86,35 @@ public class MenuButtons : MonoBehaviour
} }
} }
/// <summary>
/// Calling backend to log player out
/// </summary>
public void Logout() public void Logout()
{ {
Backend.instance.SignOut(); Backend.instance.SignOut();
} }
/// <summary>
/// Calling backend to get user profile image
/// </summary>
public void GetProfilePicture() 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)) if (Backend.instance.User != null && !string.IsNullOrEmpty(Backend.instance.User.profilePictureUrl))
Backend.instance.GetProfile(Backend.instance.User.profilePictureUrl, profilePicture); Backend.instance.GetProfile(Backend.instance.User.profilePictureUrl, profilePicture);
} }
/// <summary>
/// Load scene
/// </summary>
/// <param name="scene"></param>
public void LoadScene(string scene) public void LoadScene(string scene)
{ {
SceneManager.LoadScene(scene); SceneManager.LoadScene(scene);
} }
/// <summary>
/// Close game
/// </summary>
public void QuitGame() public void QuitGame()
{ {
Application.Quit(); Application.Quit();

View file

@ -5,7 +5,6 @@
* Customer walking handling using NavMesh * Customer walking handling using NavMesh
*/ */
using System.Collections; using System.Collections;
using UnityEngine; using UnityEngine;
using UnityEngine.AI; using UnityEngine.AI;
@ -18,10 +17,16 @@ public class NpcMovementRework : MonoBehaviour
/// </summary> /// </summary>
public NavMeshAgent agent; public NavMeshAgent agent;
/// <summary>
/// Animation assigning
/// </summary>
public Animator animator; public Animator animator;
private static readonly int IsSitting = Animator.StringToHash("isSitting"); private static readonly int IsSitting = Animator.StringToHash("isSitting");
private static readonly int Speed = Animator.StringToHash("Speed"); private static readonly int Speed = Animator.StringToHash("Speed");
/// <summary>
/// NPC's dialogue variables
/// </summary>
public TextMeshProUGUI npcWelcomeText; public TextMeshProUGUI npcWelcomeText;
public TextMeshProUGUI initialStatementText; public TextMeshProUGUI initialStatementText;
public TextMeshProUGUI npcAnswerOneText; public TextMeshProUGUI npcAnswerOneText;
@ -32,9 +37,19 @@ public class NpcMovementRework : MonoBehaviour
[SerializeField] private GameObject npcSpeechBubble; [SerializeField] private GameObject npcSpeechBubble;
[SerializeField] private GameObject npcAnswerPanel; [SerializeField] private GameObject npcAnswerPanel;
/// <summary>
/// NPC Data referemce
/// </summary>
public NpcData npcData; public NpcData npcData;
/// <summary>
/// Variable to store service
/// </summary>
public string correctService; public string correctService;
/// <summary>
/// Check if NPC should be sitting or standing
/// </summary>
public void Update() public void Update()
{ {
if (agent.velocity.magnitude > 0.1) if (agent.velocity.magnitude > 0.1)
@ -48,6 +63,9 @@ public class NpcMovementRework : MonoBehaviour
} }
} }
/// <summary>
/// Assigning references, NPC movement
/// </summary>
public void Start() public void Start()
{ {
agent = gameObject.GetComponent<NavMeshAgent>(); agent = gameObject.GetComponent<NavMeshAgent>();
@ -59,11 +77,18 @@ public class NpcMovementRework : MonoBehaviour
StartCoroutine(SitDown()); StartCoroutine(SitDown());
} }
/// <summary>
/// Call coroutine to call client
/// </summary>
public void Called() public void Called()
{ {
StartCoroutine(CustomerCalled()); StartCoroutine(CustomerCalled());
} }
/// <summary>
/// Coroutine to get NPC to coe to table
/// </summary>
/// <returns></returns>
public IEnumerator CustomerCalled() public IEnumerator CustomerCalled()
{ {
var pos = NpcManager.instance.desk; var pos = NpcManager.instance.desk;
@ -99,6 +124,10 @@ public class NpcMovementRework : MonoBehaviour
} }
/// <summary>
/// If in front of seat, NPC sits
/// </summary>
/// <returns></returns>
public IEnumerator SitDown() public IEnumerator SitDown()
{ {
var i = Random.Range(0, NpcManager.instance.Seats.Length); var i = Random.Range(0, NpcManager.instance.Seats.Length);
@ -132,6 +161,10 @@ public class NpcMovementRework : MonoBehaviour
} }
/// <summary>
/// Despawning NPCs
/// </summary>
/// <param name="endDay"></param>
public void Despawn(bool endDay = false) public void Despawn(bool endDay = false)
{ {
if (endDay) if (endDay)
@ -146,6 +179,11 @@ public class NpcMovementRework : MonoBehaviour
} }
} }
/// <summary>
/// Only despawn under certain condition
/// </summary>
/// <param name="destination"></param>
/// <returns></returns>
private IEnumerator DespawnWhenReached(Transform destination) private IEnumerator DespawnWhenReached(Transform destination)
{ {
agent.SetDestination(destination.position); agent.SetDestination(destination.position);
@ -164,6 +202,9 @@ public class NpcMovementRework : MonoBehaviour
} }
/// <summary>
/// Assign UI text based on NPC Data
/// </summary>
public void LoadNPCDialogue() public void LoadNPCDialogue()
{ {
if (GameManager.instance.currentNPC != this.gameObject) if (GameManager.instance.currentNPC != this.gameObject)

View file

@ -1,3 +1,10 @@
/*
* Author: Lin Hengrui Ryan, Livinia Poo
* Date: 15/2/25
* Description:
* Calling and assigning new npc
*/
using UnityEngine; using UnityEngine;
public class NextButton : MonoBehaviour public class NextButton : MonoBehaviour

View file

@ -48,9 +48,11 @@ public class NpcManager : MonoBehaviour
/// </summary> /// </summary>
[SerializeField] private float npcBufferTime; [SerializeField] private float npcBufferTime;
/// <summary>
/// List of seats for NPCs in scene
/// </summary>
public Seat[] Seats; public Seat[] Seats;
/// <summary> /// <summary>
/// collection of all exiting npcs /// collection of all exiting npcs
/// </summary> /// </summary>

View file

@ -2,7 +2,7 @@
* Author: Livinia Poo * Author: Livinia Poo
* Date: 1/2/25 * Date: 1/2/25
* Description: * Description:
* Paper Handling Interaction * Paper Socket Logic
*/ */
using System.Collections; using System.Collections;
@ -13,26 +13,42 @@ using UnityEngine.XR.Interaction.Toolkit.Interactors;
public class PaperSocket : MonoBehaviour public class PaperSocket : MonoBehaviour
{ {
/// <summary>
/// Variables
/// </summary>
[SerializeField] private string socketName; [SerializeField] private string socketName;
XRSocketInteractor interactor; XRSocketInteractor interactor;
/// <summary>
/// Assigning variables
/// </summary>
void Awake() void Awake()
{ {
interactor = GetComponent<XRSocketInteractor>(); interactor = GetComponent<XRSocketInteractor>();
} }
/// <summary>
/// Adding listeners
/// </summary>
void OnEnable() void OnEnable()
{ {
interactor.selectEntered.AddListener(OnPaperAttached); interactor.selectEntered.AddListener(OnPaperAttached);
interactor.selectExited.AddListener(OnPaperDetached); interactor.selectExited.AddListener(OnPaperDetached);
} }
/// <summary>
/// Removing listeners
/// </summary>
void OnDisable() void OnDisable()
{ {
interactor.selectEntered.RemoveListener(OnPaperAttached); interactor.selectEntered.RemoveListener(OnPaperAttached);
interactor.selectExited.RemoveListener(OnPaperDetached); interactor.selectExited.RemoveListener(OnPaperDetached);
} }
/// <summary>
/// Attached logic
/// </summary>
/// <param name="args"></param>
private void OnPaperAttached(SelectEnterEventArgs args) private void OnPaperAttached(SelectEnterEventArgs args)
{ {
GameObject paperObject = args.interactableObject.transform.gameObject; GameObject paperObject = args.interactableObject.transform.gameObject;
@ -62,6 +78,10 @@ public class PaperSocket : MonoBehaviour
} }
} }
/// <summary>
/// Removed logic
/// </summary>
/// <param name="args"></param>
private void OnPaperDetached(SelectExitEventArgs args) private void OnPaperDetached(SelectExitEventArgs args)
{ {
if (socketName == "Paper Socket_NPC") if (socketName == "Paper Socket_NPC")

View file

@ -1,3 +1,10 @@
/*
* Author: Livinia Poo
* Date: 12/2/25
* Description:
* Spawning paper in area
*/
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
@ -8,12 +15,22 @@ using UnityEngine.XR;
public class PaperSpawn : MonoBehaviour public class PaperSpawn : MonoBehaviour
{ {
/// <summary>
/// What to spawn
/// </summary>
[SerializeField] private GameObject paperPrefab; [SerializeField] private GameObject paperPrefab;
/// <summary>
/// Player's hands/Controllers
/// </summary>
private XRDirectInteractor playerHand; private XRDirectInteractor playerHand;
private bool handInPaperSpawn = false; private bool handInPaperSpawn = false;
private InputDevice targetDevice; private InputDevice targetDevice;
/// <summary>
/// Assigning hand
/// </summary>
void Start() void Start()
{ {
List<InputDevice> devices = new List<InputDevice>(); List<InputDevice> devices = new List<InputDevice>();
@ -29,6 +46,10 @@ public class PaperSpawn : MonoBehaviour
} }
} }
/// <summary>
/// Detecting player hand
/// </summary>
/// <param name="other"></param>
void OnTriggerEnter(Collider other) void OnTriggerEnter(Collider other)
{ {
if (other.CompareTag("PlayerHand")) if (other.CompareTag("PlayerHand"))
@ -38,6 +59,10 @@ public class PaperSpawn : MonoBehaviour
} }
} }
/// <summary>
/// Detecting player hand leave area
/// </summary>
/// <param name="other"></param>
void OnTriggerExit(Collider other) void OnTriggerExit(Collider other)
{ {
if (other.CompareTag("PlayerHand")) if (other.CompareTag("PlayerHand"))
@ -47,6 +72,9 @@ public class PaperSpawn : MonoBehaviour
} }
} }
/// <summary>
/// Spawn paper if in trigger and grabbing
/// </summary>
void Update() void Update()
{ {
if (handInPaperSpawn && playerHand != null && !playerHand.hasSelection) if (handInPaperSpawn && playerHand != null && !playerHand.hasSelection)
@ -61,6 +89,9 @@ public class PaperSpawn : MonoBehaviour
} }
} }
/// <summary>
/// Instantiate paper object
/// </summary>
void SpawnPaper() void SpawnPaper()
{ {
GameObject spawnedPaper = Instantiate(paperPrefab, playerHand.transform.position, Quaternion.identity); GameObject spawnedPaper = Instantiate(paperPrefab, playerHand.transform.position, Quaternion.identity);

View file

@ -1,7 +1,8 @@
/* /*
* Author: Shannon Goh and Livinia Poo * Author: Shannon Goh and Livinia Poo
* Date: 03/02/2025 * 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; using UnityEngine.XR.Interaction.Toolkit.Interactors;
public class PenInteractor : MonoBehaviour public class PenInteractor : MonoBehaviour
{ {
/// <summary>
/// Document script reference
/// </summary>
private StampDocument stampDocScript; private StampDocument stampDocScript;
/// <summary>
/// Sign when pen touches area
/// </summary>
/// <param name="collision"></param>
private void OnCollisionEnter(Collision collision) private void OnCollisionEnter(Collision collision)
{ {
if (PenSocketInteractor.isPickedUp && collision.gameObject.CompareTag("Paper")) if (PenSocketInteractor.isPickedUp && collision.gameObject.CompareTag("Paper"))

View file

@ -1,7 +1,8 @@
/* /*
* Author: Shannon Goh * Author: Shannon Goh
* Date: 03/02/2025 * 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 public class PenSocketInteractor : MonoBehaviour
{ {
/// <summary>
/// Pen set up
/// </summary>
XRSocketInteractor penSocket; XRSocketInteractor penSocket;
public static bool isPickedUp = false; public static bool isPickedUp = false;
/// <summary>
/// Assigning pen socket
/// </summary>
private void Awake() private void Awake()
{ {
penSocket = GetComponent<XRSocketInteractor>(); penSocket = GetComponent<XRSocketInteractor>();
} }
/// <summary>
/// Adding listeners
/// </summary>
void OnEnable() void OnEnable()
{ {
penSocket.selectEntered.AddListener(OnPenPlaced); penSocket.selectEntered.AddListener(OnPenPlaced);
penSocket.selectExited.AddListener(OnPenPickedUp); penSocket.selectExited.AddListener(OnPenPickedUp);
} }
/// <summary>
/// Removing listeners
/// </summary>
void OnDisable() void OnDisable()
{ {
penSocket.selectEntered.RemoveListener(OnPenPlaced); penSocket.selectEntered.RemoveListener(OnPenPlaced);
penSocket.selectExited.RemoveListener(OnPenPickedUp); penSocket.selectExited.RemoveListener(OnPenPickedUp);
} }
/// <summary>
/// Declare that pen is picked up
/// </summary>
/// <param name="args"></param>
private void OnPenPickedUp(SelectExitEventArgs args) private void OnPenPickedUp(SelectExitEventArgs args)
{ {
isPickedUp = true; isPickedUp = true;
Debug.Log("Pen picked up");
} }
/// <summary>
/// Declare pen is returned back
/// </summary>
/// <param name="args"></param>
private void OnPenPlaced(SelectEnterEventArgs args) private void OnPenPlaced(SelectEnterEventArgs args)
{ {
isPickedUp = false; isPickedUp = false;
Debug.Log("Pen placed back");
} }
} }

View file

@ -1,6 +1,6 @@
/* /*
* Author: Livinia Poo * Author: Livinia Poo
* Date: 1/2/25 * Date: 16/2/25
* Description: * Description:
* Dialogue Interaction (Player side) * Dialogue Interaction (Player side)
*/ */
@ -12,6 +12,9 @@ using UnityEngine;
public class PlayerDialogueInteraction : MonoBehaviour public class PlayerDialogueInteraction : MonoBehaviour
{ {
/// <summary>
/// Dialogue instance
/// </summary>
public static PlayerDialogueInteraction instance; public static PlayerDialogueInteraction instance;
///<summary> ///<summary>
@ -49,6 +52,9 @@ public class PlayerDialogueInteraction : MonoBehaviour
public GameObject sgEnableServiceButton; public GameObject sgEnableServiceButton;
public StampDocument currentDocument; public StampDocument currentDocument;
/// <summary>
/// Do not destroy on load, and resetting UI
/// </summary>
void Awake() void Awake()
{ {
if (instance == null) if (instance == null)
@ -64,6 +70,9 @@ public class PlayerDialogueInteraction : MonoBehaviour
ResetChecklist(); ResetChecklist();
} }
/// <summary>
/// Clear and disable dialogues
/// </summary>
public void ResetDialogue() public void ResetDialogue()
{ {
playerDialogue.SetActive(false); playerDialogue.SetActive(false);
@ -77,6 +86,9 @@ public class PlayerDialogueInteraction : MonoBehaviour
question3Asked = false; question3Asked = false;
} }
/// <summary>
/// Clearing checklist
/// </summary>
public void ResetChecklist() public void ResetChecklist()
{ {
welcomeTick.SetActive(false); welcomeTick.SetActive(false);
@ -86,6 +98,12 @@ public class PlayerDialogueInteraction : MonoBehaviour
takeDocumentsTick.SetActive(false); takeDocumentsTick.SetActive(false);
} }
/// <summary>
/// Assigning UI text from npcData
/// </summary>
/// <param name="q1"></param>
/// <param name="q2"></param>
/// <param name="q3"></param>
public void SetPlayerQuestions(string q1, string q2, string q3) public void SetPlayerQuestions(string q1, string q2, string q3)
{ {
playerQuestionOneText.text = q1; playerQuestionOneText.text = q1;
@ -93,11 +111,18 @@ public class PlayerDialogueInteraction : MonoBehaviour
playerQuestionThreeText.text = q3; playerQuestionThreeText.text = q3;
} }
/// <summary>
/// Assigning UI text from npcData
/// </summary>
/// <param name="response"></param>
public void SetPlayerResposne(string response) public void SetPlayerResposne(string response)
{ {
playerResponseText.text = response; playerResponseText.text = response;
} }
/// <summary>
/// Logic after weloming NPC
/// </summary>
public void WelcomePressed() public void WelcomePressed()
{ {
questionPanel.SetActive(true); questionPanel.SetActive(true);
@ -108,6 +133,10 @@ public class PlayerDialogueInteraction : MonoBehaviour
GameManager.instance.currentNPC.GetComponent<NpcMovementRework>().initialStatementText.gameObject.SetActive(true); GameManager.instance.currentNPC.GetComponent<NpcMovementRework>().initialStatementText.gameObject.SetActive(true);
} }
/// <summary>
/// Logic for each question asked
/// </summary>
/// <param name="questionIndex"></param>
public void OnQuestionSelected(int questionIndex) public void OnQuestionSelected(int questionIndex)
{ {
if (questionIndex == 1) if (questionIndex == 1)
@ -144,6 +173,9 @@ public class PlayerDialogueInteraction : MonoBehaviour
CheckAllQuestionsAsked(); CheckAllQuestionsAsked();
} }
/// <summary>
/// Ticks checklist after asking questions at least once
/// </summary>
void CheckAllQuestionsAsked() void CheckAllQuestionsAsked()
{ {
if (question1Asked && question2Asked && question3Asked) if (question1Asked && question2Asked && question3Asked)
@ -152,6 +184,9 @@ public class PlayerDialogueInteraction : MonoBehaviour
} }
} }
/// <summary>
/// Logic for responding to NPC question
/// </summary>
public void OnResponseSelected() public void OnResponseSelected()
{ {
questionPanel.SetActive(true); questionPanel.SetActive(true);
@ -163,6 +198,11 @@ public class PlayerDialogueInteraction : MonoBehaviour
GameManager.instance.currentNPC.GetComponent<NpcMovementRework>().npcAnswerThreeText.gameObject.SetActive(false); GameManager.instance.currentNPC.GetComponent<NpcMovementRework>().npcAnswerThreeText.gameObject.SetActive(false);
GameManager.instance.currentNPC.GetComponent<NpcMovementRework>().npcClarifiedResponse.gameObject.SetActive(true); GameManager.instance.currentNPC.GetComponent<NpcMovementRework>().npcClarifiedResponse.gameObject.SetActive(true);
} }
/// <summary>
/// Sign paper correct signature and close services
/// </summary>
/// <param name="service"></param>
public void OnServiceSelected(string service) public void OnServiceSelected(string service)
{ {
servicesPanel.SetActive(false); servicesPanel.SetActive(false);

View file

@ -11,14 +11,31 @@ using UnityEngine;
public class ShiftManager : MonoBehaviour public class ShiftManager : MonoBehaviour
{ {
/// <summary>
/// Shift details
/// </summary>
[SerializeField] private float shiftDuration; [SerializeField] private float shiftDuration;
private float remainingTime; private float remainingTime;
[SerializeField] private GameObject npcSpawnArea; [SerializeField] private GameObject npcSpawnArea;
/// <summary>
/// Shift box collider trigger
/// </summary>
private Collider shiftTrigger; private Collider shiftTrigger;
/// <summary>
/// Gamemanager reference
/// </summary>
private GameManager gm; private GameManager gm;
/// <summary>
/// Day manager reference
/// </summary>
private DayManager dayManager; private DayManager dayManager;
/// <summary>
/// Assigning variables and references
/// </summary>
void Awake() void Awake()
{ {
gm = GameObject.Find("Game Manager").GetComponent<GameManager>(); gm = GameObject.Find("Game Manager").GetComponent<GameManager>();
@ -30,6 +47,10 @@ public class ShiftManager : MonoBehaviour
shiftTrigger = GetComponent<Collider>(); shiftTrigger = GetComponent<Collider>();
} }
/// <summary>
/// Start shift on trigger
/// </summary>
/// <param name="other"></param>
void OnTriggerEnter(Collider other) void OnTriggerEnter(Collider other)
{ {
if (other.CompareTag("Player") && !gm.shiftStarted) if (other.CompareTag("Player") && !gm.shiftStarted)
@ -43,6 +64,10 @@ public class ShiftManager : MonoBehaviour
} }
} }
/// <summary>
/// Timer to count down shift end
/// </summary>
/// <returns></returns>
IEnumerator StartWorkShift() IEnumerator StartWorkShift()
{ {
while (remainingTime > 0) while (remainingTime > 0)
@ -61,6 +86,9 @@ public class ShiftManager : MonoBehaviour
EndShift(); EndShift();
} }
/// <summary>
/// Stop all shift-related logic
/// </summary>
void EndShift() void EndShift()
{ {
Debug.Log("Shift ended!"); Debug.Log("Shift ended!");
@ -72,6 +100,9 @@ public class ShiftManager : MonoBehaviour
NpcManager.instance.EndDay(); NpcManager.instance.EndDay();
} }
/// <summary>
/// Start next day shift
/// </summary>
public void AllowShiftStart() public void AllowShiftStart()
{ {
shiftTrigger.enabled = true; shiftTrigger.enabled = true;

View file

@ -1,3 +1,10 @@
/*
* Author: Livinia Poo
* Date: 13/2/25
* Description:
* Document Logic
*/
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
@ -5,15 +12,15 @@ using UnityEngine;
public class StampDocument : MonoBehaviour public class StampDocument : MonoBehaviour
{ {
[Header("Stamps")] [SerializeField] private GameObject financialStamp; [Header("Stamps")]
[SerializeField] private GameObject financialStamp;
[SerializeField] private GameObject residentialStamp; [SerializeField] private GameObject residentialStamp;
[SerializeField] private GameObject dvStamp; [SerializeField] private GameObject dvStamp;
[SerializeField] private GameObject disabilitiesStamp; [SerializeField] private GameObject disabilitiesStamp;
[SerializeField] private GameObject signature; [SerializeField] private GameObject signature;
[Header("Signatures")] [SerializeField] [Header("Signatures")]
private GameObject comcareSignature; [SerializeField] private GameObject comcareSignature;
[SerializeField] private GameObject fscSignature; [SerializeField] private GameObject fscSignature;
[SerializeField] private GameObject peersSignature; [SerializeField] private GameObject peersSignature;
[SerializeField] private GameObject transitionalShelterSignature; [SerializeField] private GameObject transitionalShelterSignature;
@ -21,14 +28,26 @@ public class StampDocument : MonoBehaviour
[SerializeField] private GameObject childrenYoungHomeSignature; [SerializeField] private GameObject childrenYoungHomeSignature;
[SerializeField] private GameObject sgEnableSignature; [SerializeField] private GameObject sgEnableSignature;
/// <summary>
/// Details to reference later on
/// </summary>
public bool isStamped; public bool isStamped;
public bool isSigned; public bool isSigned;
public string assignedDepartment; public string assignedDepartment;
public string assignedService; public string assignedService;
/// <summary>
/// See finalised document detail
/// </summary>
/// <returns></returns>
private string CheckFinalDepartment() private string CheckFinalDepartment()
{ {
return $"{assignedDepartment}-{assignedService}"; return $"{assignedDepartment}-{assignedService}";
} }
/// <summary>
/// Disabling all signatures and samps
/// </summary>
void Start() void Start()
{ {
financialStamp.SetActive(false); financialStamp.SetActive(false);
@ -49,6 +68,9 @@ public class StampDocument : MonoBehaviour
isStamped = false; isStamped = false;
} }
/// <summary>
/// Financial stamp appear, assign department and declare stamped
/// </summary>
public void StampFinancial() public void StampFinancial()
{ {
financialStamp.SetActive(true); financialStamp.SetActive(true);
@ -56,6 +78,9 @@ public class StampDocument : MonoBehaviour
assignedDepartment = "Financial"; assignedDepartment = "Financial";
} }
/// <summary>
/// Residential stamp appear, assign department and declare stamped
/// </summary>
public void StampResidential() public void StampResidential()
{ {
residentialStamp.SetActive(true); residentialStamp.SetActive(true);
@ -63,6 +88,9 @@ public class StampDocument : MonoBehaviour
assignedDepartment = "Residential"; assignedDepartment = "Residential";
} }
/// <summary>
/// DV stamp appear, assign department and declare stamped
/// </summary>
public void StampDV() public void StampDV()
{ {
dvStamp.SetActive(true); dvStamp.SetActive(true);
@ -70,6 +98,9 @@ public class StampDocument : MonoBehaviour
assignedDepartment = "Domestic Violence"; assignedDepartment = "Domestic Violence";
} }
/// <summary>
/// Disabilities stamp appear, assign department and declare stamped
/// </summary>
public void StampDisabilities() public void StampDisabilities()
{ {
disabilitiesStamp.SetActive(true); disabilitiesStamp.SetActive(true);
@ -77,6 +108,9 @@ public class StampDocument : MonoBehaviour
assignedDepartment = "Disabilities"; assignedDepartment = "Disabilities";
} }
/// <summary>
/// Respectivee signature appear, assign servoce and declare signed
/// </summary>
public void Sign(string service) public void Sign(string service)
{ {
switch (service) switch (service)
@ -128,6 +162,10 @@ public class StampDocument : MonoBehaviour
} }
/// <summary>
/// Declares this is current document
/// </summary>
/// <param name="other"></param>
private void OnTriggerEnter(Collider other) private void OnTriggerEnter(Collider other)
{ {
if (other.gameObject.CompareTag("Pen")) if (other.gameObject.CompareTag("Pen"))

View file

@ -1,3 +1,11 @@
/*
* Author: Yeo Sai Puay and Livinia Poo
* Date: 3/2/25
* Description:
* Stamp Logic
*/
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
@ -5,15 +13,28 @@ using UnityEngine;
public class StampInteractor : MonoBehaviour public class StampInteractor : MonoBehaviour
{ {
/// <summary>
/// Name of the stam[
/// </summary>
public string stampName; public string stampName;
/// <summary>
/// StampDoc reference
/// </summary>
private StampDocument stampDocScript; private StampDocument stampDocScript;
/// <summary>
/// Assigning name of stamp
/// </summary>
void Awake() void Awake()
{ {
stampName = gameObject.name; stampName = gameObject.name;
} }
/// <summary>
/// Stamping correct department on collision
/// </summary>
/// <param name="collision"></param>
private void OnCollisionEnter(Collision collision) private void OnCollisionEnter(Collision collision)
{ {
if (StampSocketInteractor.isHeld && collision.gameObject.CompareTag("Paper")) if (StampSocketInteractor.isHeld && collision.gameObject.CompareTag("Paper"))

View file

@ -1,3 +1,11 @@
/*
* Author: Yeo Sai Puay
* Date: 3/2/25
* Description:
* Stamp Socket Interactor Handle script
*/
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
@ -7,39 +15,54 @@ using UnityEngine.XR.Interaction.Toolkit.Interactors;
public class StampSocketInteractor : MonoBehaviour public class StampSocketInteractor : MonoBehaviour
{ {
/// <summary>
/// Stamp set up
/// </summary>
XRSocketInteractor stampSocket; XRSocketInteractor stampSocket;
public static bool isHeld = false; public static bool isHeld = false;
/// <summary>
/// Assigning stamp socket
/// </summary>
private void Awake() private void Awake()
{ {
stampSocket = GetComponent<XRSocketInteractor>(); stampSocket = GetComponent<XRSocketInteractor>();
} }
/// <summary>
/// Assigning listeners
/// </summary>
void OnEnable() void OnEnable()
{ {
stampSocket.selectEntered.AddListener(OnStampTable); stampSocket.selectEntered.AddListener(OnStampTable);
stampSocket.selectExited.AddListener(OnStampHeld); stampSocket.selectExited.AddListener(OnStampHeld);
} }
/// <summary>
/// Removing listeners
/// </summary>
private void OnDisable() private void OnDisable()
{ {
stampSocket.selectEntered.RemoveListener(OnStampTable); stampSocket.selectEntered.RemoveListener(OnStampTable);
stampSocket.selectExited.RemoveListener(OnStampHeld); stampSocket.selectExited.RemoveListener(OnStampHeld);
} }
/// <summary>
/// Declare stamp is being held by player
/// </summary>
/// <param name="args"></param>
private void OnStampHeld(SelectExitEventArgs args) private void OnStampHeld(SelectExitEventArgs args)
{ {
isHeld = true; isHeld = true;
Debug.Log("Stamp is held");
/*Debug.Log(isHeld.ToString());*/
} }
/// <summary>
/// Declare stamp is back in socket
/// </summary>
/// <param name="args"></param>
private void OnStampTable(SelectEnterEventArgs args) private void OnStampTable(SelectEnterEventArgs args)
{ {
isHeld = false; isHeld = false;
Debug.Log("Stamp is on table");
} }
} }

View file

@ -11,8 +11,14 @@ using UnityEngine;
public class UIFacePlayer : MonoBehaviour public class UIFacePlayer : MonoBehaviour
{ {
/// <summary>
/// Referencinig player's cam
/// </summary>
public Transform playerCam; public Transform playerCam;
/// <summary>
/// Player's cam details
/// </summary>
void Start() void Start()
{ {
if (Camera.main != null) if (Camera.main != null)
@ -21,6 +27,9 @@ public class UIFacePlayer : MonoBehaviour
} }
} }
/// <summary>
/// UI will always face player
/// </summary>
void Update() void Update()
{ {
if (playerCam != null && Vector3.Distance(transform.position, playerCam.position) < 2) if (playerCam != null && Vector3.Distance(transform.position, playerCam.position) < 2)

View file

@ -1,3 +1,11 @@
/*
* Author: Lin Hengrui Ryan
* Date: 23/1/25
* Description:
* Document Logic
*/
using Postgrest.Attributes; using Postgrest.Attributes;
using Postgrest.Models; using Postgrest.Models;