Add utils + refacto

This commit is contained in:
2026-01-30 17:39:26 +01:00
parent 9ff17b5305
commit 23d3cb5d2c
29 changed files with 675 additions and 461 deletions
@@ -1,5 +1,6 @@
using UnityEngine;
using System;
using Unheimlich.Core;
using Unheimlich.Data.Dialogues;
using Unheimlich.Gameplay.Player;
using Unheimlich.UI;
@@ -8,9 +9,8 @@ using System.Collections.Generic;
namespace Unheimlich.Managers
{
public class DialogueManager : MonoBehaviour
{
public static DialogueManager Instance { get; private set; }
public class DialogueManager : Singleton<DialogueManager>
{
[Header("State")]
public bool IsInDialogue = false;
@@ -51,14 +51,8 @@ namespace Unheimlich.Managers
private float _autoCloseTimer = 0f;
private bool _isWaitingForAutoClose = false;
private void Awake()
protected override void OnAwake()
{
if (Instance != null && Instance != this)
{
Destroy(this);
return;
}
Instance = this;
}
private void Start()