Add utils + refacto
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user