Fix journal opening during dialog
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user