stash work

This commit is contained in:
Michal Pikulski
2025-10-16 16:18:04 +02:00
parent c7906a9968
commit d2c6c5df38
19 changed files with 353 additions and 277 deletions

View File

@@ -15,23 +15,10 @@ namespace Core
private static ItemManager _instance;
private static bool _isQuitting;
public static ItemManager Instance
{
get
{
if (_instance == null && Application.isPlaying && !_isQuitting)
{
_instance = FindAnyObjectByType<ItemManager>();
if (_instance == null)
{
var go = new GameObject("ItemManager");
_instance = go.AddComponent<ItemManager>();
// DontDestroyOnLoad(go);
}
}
return _instance;
}
}
/// <summary>
/// Singleton instance of the ItemManager. No longer creates an instance if one doesn't exist.
/// </summary>
public static ItemManager Instance => _instance;
private readonly HashSet<Pickup> _pickups = new HashSet<Pickup>();
private readonly HashSet<ItemSlot> _itemSlots = new HashSet<ItemSlot>();
@@ -68,11 +55,6 @@ namespace Core
// Register for post-boot initialization
BootCompletionService.RegisterInitAction(InitializePostBoot);
}
void Start()
{
// SceneManagerService subscription moved to InitializePostBoot
}
private void InitializePostBoot()
{