Revamp the prompt system, the bootstrapper system, the starting cinematic

This commit is contained in:
Michal Pikulski
2025-10-16 19:43:19 +02:00
parent df604fbc03
commit 50448c5bd3
89 changed files with 3964 additions and 677 deletions

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using UnityEngine;
using Interactions;
using Bootstrap;
namespace Core
{
@@ -14,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>();
@@ -63,13 +51,16 @@ namespace Core
void Awake()
{
_instance = this;
// Register for post-boot initialization
BootCompletionService.RegisterInitAction(InitializePostBoot);
}
void Start()
private void InitializePostBoot()
{
// Subscribe to scene load completed so we can clear registrations when scenes change
// Access Instance directly to ensure the service is initialized and we get the event hookup.
SceneManagerService.Instance.SceneLoadStarted += OnSceneLoadStarted;
Logging.Debug("[ItemManager] Subscribed to SceneManagerService events");
}
void OnDestroy()