Add support for images in dialogue windows (#19)

- Extend editor nodes with custom DialogueContent data type that holds either image or text
- Extend the dialogue importer to correctly process the new content into updated RuntimeDialogue content
- Update SpeechBubble to be able to display either text or image
- Add a custom property drawer for the DialogueContent to allow easy switching in graph authoring

Co-authored-by: Michal Pikulski <michal@foolhardyhorizons.com>
Reviewed-on: #19
This commit is contained in:
2025-10-08 09:34:58 +00:00
parent 7b949c5cb8
commit 3807ac652c
19 changed files with 1128 additions and 461 deletions

View File

@@ -7,10 +7,34 @@ namespace UI
{
public class PauseMenu : MonoBehaviour
{
private static PauseMenu _instance;
private static bool _isQuitting;
public static PauseMenu Instance
{
get
{
if (_instance == null && Application.isPlaying && !_isQuitting)
{
_instance = FindAnyObjectByType<PauseMenu>();
if (_instance == null)
{
var go = new GameObject("PauseMenu");
_instance = go.AddComponent<PauseMenu>();
// DontDestroyOnLoad(go);
}
}
return _instance;
}
}
[Header("UI References")]
[SerializeField] private GameObject pauseMenuPanel;
[SerializeField] private GameObject pauseButton;
public event Action OnGamePaused;
public event Action OnGameResumed;
private void Start()
{
// Subscribe to scene loaded events
@@ -32,6 +56,11 @@ namespace UI
}
}
void OnApplicationQuit()
{
_isQuitting = true;
}
/// <summary>
/// Sets the pause menu game object active or inactive based on the current level
/// </summary>