Fixed
You can click on characters whilst the journal is open You can click on characters whilst selecting dialog options Added sfx option to character data
This commit is contained in:
@@ -21,6 +21,12 @@ public class AdventurerInteractable : MonoBehaviour
|
||||
|
||||
private void OnMouseDown()
|
||||
{
|
||||
if (GameManager.Instance.uiManager.InputBlocked)
|
||||
return;
|
||||
|
||||
if (GameManager.Instance.dialogueController.DialogueInProgress)
|
||||
return;
|
||||
|
||||
PlayerController.Instance.cameraMovement = false;
|
||||
CharacterData character = CharacterManager.Instance.GetCharacterDataByName(m_name);
|
||||
GameManager.Instance.dialogueController.DisplayCharacterText(character);
|
||||
|
||||
@@ -14,4 +14,6 @@ public class CharacterData : ScriptableObject
|
||||
|
||||
[Header("The index of the dialogue relates to what question it should link too.")]
|
||||
public List<Dialogue> m_dialogueOptions;
|
||||
|
||||
public AudioSource m_typingSfx;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ public class GameManager : MonoBehaviour
|
||||
public static GameManager Instance;
|
||||
public Image fadeRect;
|
||||
public DialogueController dialogueController;
|
||||
public UIManager uiManager;
|
||||
|
||||
[SerializeField] private float m_fadeT;
|
||||
private float m_fadeTotal;
|
||||
@@ -54,9 +55,6 @@ public class GameManager : MonoBehaviour
|
||||
|
||||
fadeRect.color = new Color(0f, 0f, 0f, Mathf.Lerp(0, 1, m_fadeT));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void FadePingPong(Action callback = null)
|
||||
|
||||
@@ -33,6 +33,8 @@ public class Journal : MonoBehaviour
|
||||
return;
|
||||
}
|
||||
|
||||
GameManager.Instance.uiManager.BlockInput(true);
|
||||
|
||||
m_availableAdventurers.Clear();
|
||||
foreach (var character in CharacterManager.Instance.CharacterDatas)
|
||||
{
|
||||
@@ -57,6 +59,8 @@ public class Journal : MonoBehaviour
|
||||
journal.SetActive(false);
|
||||
adventurerPage.gameObject.SetActive(false);
|
||||
PlayerController.Instance.cameraMovement = true;
|
||||
|
||||
GameManager.Instance.uiManager.BlockInput(false);
|
||||
}
|
||||
|
||||
public void SetJournalAdventurerPage(int id)
|
||||
|
||||
15
Assets/Scripts/UIManager.cs
Normal file
15
Assets/Scripts/UIManager.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class UIManager : MonoBehaviour
|
||||
{
|
||||
public bool InputBlocked => m_blocked;
|
||||
|
||||
private bool m_blocked = false;
|
||||
|
||||
public void BlockInput(bool value)
|
||||
{
|
||||
m_blocked = value;
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/UIManager.cs.meta
Normal file
11
Assets/Scripts/UIManager.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ce56325fe9b072041a2c2416149044a7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user