Compare commits
No commits in common. "bdd216a46d8e40cfa40d9cb6d298cb42462f9ecb" and "5b5e16d4db511d8422730e83d905bc78c628e98b" have entirely different histories.
bdd216a46d
...
5b5e16d4db
6 changed files with 29 additions and 51 deletions
|
@ -4634,6 +4634,7 @@ MonoBehaviour:
|
||||||
dayEnded: 0
|
dayEnded: 0
|
||||||
shiftStarted: 0
|
shiftStarted: 0
|
||||||
currentNPC: {fileID: 0}
|
currentNPC: {fileID: 0}
|
||||||
|
currentStampDoc: {fileID: 0}
|
||||||
frontWalkPoints:
|
frontWalkPoints:
|
||||||
- {fileID: 1521924626}
|
- {fileID: 1521924626}
|
||||||
- {fileID: 2036976913}
|
- {fileID: 2036976913}
|
||||||
|
@ -13747,7 +13748,7 @@ GameObject:
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 0
|
m_IsActive: 1
|
||||||
--- !u!114 &1627151198
|
--- !u!114 &1627151198
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -16945,7 +16946,7 @@ GameObject:
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 0
|
m_IsActive: 1
|
||||||
--- !u!114 &2043314902
|
--- !u!114 &2043314902
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
@ -23,6 +23,7 @@ public class GameManager : MonoBehaviour
|
||||||
public bool shiftStarted;
|
public bool shiftStarted;
|
||||||
|
|
||||||
public GameObject currentNPC;
|
public GameObject currentNPC;
|
||||||
|
public GameObject currentStampDoc;
|
||||||
|
|
||||||
[Header("Walk Points (FOR DEBUGGING")]
|
[Header("Walk Points (FOR DEBUGGING")]
|
||||||
public Transform[] frontWalkPoints;
|
public Transform[] frontWalkPoints;
|
||||||
|
|
|
@ -25,4 +25,7 @@ public class NpcData
|
||||||
public int points;
|
public int points;
|
||||||
public bool hasPaper;
|
public bool hasPaper;
|
||||||
public string correctDepartment;
|
public string correctDepartment;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -12,26 +12,21 @@ 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
|
||||||
{
|
{
|
||||||
|
[SerializeField] private GameObject stampDoc;
|
||||||
private StampDocument stampDocScript;
|
private StampDocument stampDocScript;
|
||||||
|
|
||||||
|
void Awake()
|
||||||
|
{
|
||||||
|
stampDocScript = stampDoc.GetComponent<StampDocument>();
|
||||||
|
}
|
||||||
|
|
||||||
private void OnCollisionEnter(Collision collision)
|
private void OnCollisionEnter(Collision collision)
|
||||||
{
|
{
|
||||||
if (PenSocketInteractor.isPickedUp && collision.gameObject.CompareTag("Paper"))
|
if (PenSocketInteractor.isPickedUp && collision.gameObject.CompareTag("Paper"))
|
||||||
{
|
{
|
||||||
if (collision.collider.gameObject.name == "Stamp-Sign Area")
|
if (collision.collider.gameObject.name == "Stamp-Sign Area")
|
||||||
{
|
|
||||||
stampDocScript = collision.gameObject.GetComponent<StampDocument>();
|
|
||||||
|
|
||||||
if(stampDocScript != null)
|
|
||||||
{
|
|
||||||
if(!stampDocScript.isSigned)
|
|
||||||
{
|
{
|
||||||
stampDocScript.SignDocument();
|
stampDocScript.SignDocument();
|
||||||
} }
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.LogError("Paper doesn't have StampDocScript");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,10 +10,6 @@ public class StampDocument : MonoBehaviour
|
||||||
[SerializeField] private GameObject disabilitiesStamp;
|
[SerializeField] private GameObject disabilitiesStamp;
|
||||||
[SerializeField] private GameObject signature;
|
[SerializeField] private GameObject signature;
|
||||||
|
|
||||||
public bool isStamped;
|
|
||||||
public bool isSigned;
|
|
||||||
public string assignedService;
|
|
||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
financialStamp.SetActive(false);
|
financialStamp.SetActive(false);
|
||||||
|
@ -21,42 +17,30 @@ public class StampDocument : MonoBehaviour
|
||||||
dvStamp.SetActive(false);
|
dvStamp.SetActive(false);
|
||||||
disabilitiesStamp.SetActive(false);
|
disabilitiesStamp.SetActive(false);
|
||||||
signature.SetActive(false);
|
signature.SetActive(false);
|
||||||
|
|
||||||
isSigned = false;
|
|
||||||
isStamped = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void StampFinancial()
|
public void StampFinancial()
|
||||||
{
|
{
|
||||||
financialStamp.SetActive(true);
|
financialStamp.SetActive(true);
|
||||||
isStamped = true;
|
|
||||||
assignedService = "Financial";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void StampResidential()
|
public void StampResidential()
|
||||||
{
|
{
|
||||||
residentialStamp.SetActive(true);
|
residentialStamp.SetActive(true);
|
||||||
isStamped = true;
|
|
||||||
assignedService = "Residential";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void StampDV()
|
public void StampDV()
|
||||||
{
|
{
|
||||||
dvStamp.SetActive(true);
|
dvStamp.SetActive(true);
|
||||||
isStamped = true;
|
|
||||||
assignedService = "Domestic Violence";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void StampDisabilities()
|
public void StampDisabilities()
|
||||||
{
|
{
|
||||||
disabilitiesStamp.SetActive(true);
|
disabilitiesStamp.SetActive(true);
|
||||||
isStamped = true;
|
|
||||||
assignedService = "Disabilities";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SignDocument()
|
public void SignDocument()
|
||||||
{
|
{
|
||||||
signature.SetActive(true);
|
signature.SetActive(true);
|
||||||
isSigned = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,14 @@ public class StampInteractor : MonoBehaviour
|
||||||
{
|
{
|
||||||
public string stampName;
|
public string stampName;
|
||||||
|
|
||||||
|
[SerializeField] private GameObject stampDoc;
|
||||||
private StampDocument stampDocScript;
|
private StampDocument stampDocScript;
|
||||||
|
|
||||||
void Awake()
|
void Awake()
|
||||||
{
|
{
|
||||||
stampName = gameObject.name;
|
stampName = gameObject.name;
|
||||||
|
|
||||||
|
stampDocScript = stampDoc.GetComponent<StampDocument>();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnCollisionEnter(Collision collision)
|
private void OnCollisionEnter(Collision collision)
|
||||||
|
@ -20,32 +23,23 @@ public class StampInteractor : MonoBehaviour
|
||||||
{
|
{
|
||||||
if (collision.collider.gameObject.name == "Stamp-Sign Area")
|
if (collision.collider.gameObject.name == "Stamp-Sign Area")
|
||||||
{
|
{
|
||||||
stampDocScript = collision.gameObject.GetComponent<StampDocument>();
|
if (stampName == "Stamp_Financial")
|
||||||
|
|
||||||
if(stampDocScript != null)
|
|
||||||
{
|
|
||||||
if (stampName == "Stamp_Financial" && !stampDocScript.isStamped)
|
|
||||||
{
|
{
|
||||||
stampDocScript.StampFinancial();
|
stampDocScript.StampFinancial();
|
||||||
}
|
}
|
||||||
else if (stampName == "Stamp_Residential" && !stampDocScript.isStamped)
|
else if (stampName == "Stamp_Residential")
|
||||||
{
|
{
|
||||||
stampDocScript.StampResidential();
|
stampDocScript.StampResidential();
|
||||||
}
|
}
|
||||||
else if (stampName == "Stamp_DV" && !stampDocScript.isStamped)
|
else if (stampName == "Stamp_DV")
|
||||||
{
|
{
|
||||||
stampDocScript.StampDV();
|
stampDocScript.StampDV();
|
||||||
}
|
}
|
||||||
else if (stampName == "Stamp_Disabilities" && !stampDocScript.isStamped)
|
else if (stampName == "Stamp_Disabilities")
|
||||||
{
|
{
|
||||||
stampDocScript.StampDisabilities();
|
stampDocScript.StampDisabilities();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.LogError("Paper doesn't have StampDocScript");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue