рефакторю управление игроком

This commit is contained in:
vladislove committed 2026-09-22 20:51:51 +03:00
1 parent 2746850727
commit f632508497
18 files changed
+1044 -66

No files matched your search

@@ -0,0 +1,20 @@
using UnityEngine;
namespace _Project.Scripts.Utilities
{
public abstract class MonoSingleton<T> : MonoBehaviour where T : MonoBehaviour
{
public static T Instance { get; private set; }
protected virtual void Awake()
{
if (Instance != null&& Instance != this)
{
Destroy(gameObject);
return;
}
Instance = this as T;
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: e974b3a40b5b4d09b675d2139ac7407b
timeCreated: 1790083100