Fix journal opening during dialog

This commit is contained in:
Minz committed 2023-07-08 23:01:49 +02:00
1 parent 9a62b3ad3d
commit 30d9d7f1ec
3 files changed
+66 -11

No files matched your search

+13 -8
View File
@@ -4,15 +4,20 @@ using UnityEngine;
public class GameManager : MonoBehaviour
{
// Start is called before the first frame update
void Start()
public static GameManager Instance;
public DialogueController dialogueController;
private void Awake()
{
if (Instance == null)
{
Instance = this;
}
else
{
Debug.LogWarning("There can only be one instance of the CharacterManager class");
}
}
// Update is called once per frame
void Update()
{
}
}
+6 -1
View File
@@ -27,7 +27,12 @@ public class Journal : MonoBehaviour
private void OnMouseDown()
{
Debug.Log("MOUSE DOWN ON INVENTORY");
if (GameManager.Instance.dialogueController.DialogueInProgress)
{
Debug.Log("Dialog in progress, not howing journal");
return;
}
m_availableAdventurers.Clear();
foreach (var character in CharacterManager.Instance.CharacterDatas)
{