Rework of base interactables and managed behaviors

This commit is contained in:
Michal Pikulski
2025-11-04 11:11:27 +01:00
parent 0dc3f3e803
commit c57e3aa7e0
62 changed files with 11193 additions and 1376 deletions

View File

@@ -1,6 +1,6 @@
using AppleHills.Data.CardSystem;
using Bootstrap;
using Core;
using Core.Lifecycle;
using Data.CardSystem;
using Pixelplacement;
using UI.Core;
@@ -13,7 +13,7 @@ namespace UI.CardSystem
/// Main UI controller for the card album system.
/// Manages the backpack icon and navigation between card system pages.
/// </summary>
public class CardAlbumUI : MonoBehaviour
public class CardAlbumUI : ManagedBehaviour
{
[Header("UI References")]
[SerializeField] private GameObject backpackIcon;
@@ -34,7 +34,9 @@ namespace UI.CardSystem
private CardSystemManager _cardManager;
private bool _hasUnseenCards;
private void Awake()
public override int ManagedAwakePriority => 65; // UI card systems
protected override void OnManagedAwake()
{
// Set up backpack button
if (backpackButton != null)
@@ -45,13 +47,7 @@ namespace UI.CardSystem
// Hide notification dot initially
if (boosterNotificationDot != null)
boosterNotificationDot.gameObject.SetActive(false);
// Register for post-boot initialization
BootCompletionService.RegisterInitAction(InitializePostBoot);
}
private void InitializePostBoot()
{
// Initially show only the backpack icon
ShowOnlyBackpackIcon();