Setup more of the card system stuff
This commit is contained in:
committed by
Michal Adam Pikulski
parent
b1df36d48c
commit
80005e6b7d
@@ -23,8 +23,7 @@ namespace AppleHills.UI.CardSystem
|
||||
|
||||
[Header("UI Elements")]
|
||||
[SerializeField] private Button backpackButton;
|
||||
[SerializeField] private Text boosterCountText;
|
||||
[SerializeField] private GameObject notificationDot;
|
||||
[SerializeField] private BoosterNotificationDot boosterNotificationDot; // Changed to BoosterNotificationDot
|
||||
[SerializeField] private GameObject backpackAnimationTarget;
|
||||
[SerializeField] private GameObject newCardNotification;
|
||||
|
||||
@@ -62,8 +61,8 @@ namespace AppleHills.UI.CardSystem
|
||||
ShowOnlyBackpackIcon();
|
||||
|
||||
// Hide notifications initially
|
||||
if (notificationDot != null)
|
||||
notificationDot.SetActive(false);
|
||||
if (boosterNotificationDot != null)
|
||||
boosterNotificationDot.gameObject.SetActive(false);
|
||||
|
||||
if (newCardNotification != null)
|
||||
newCardNotification.SetActive(false);
|
||||
@@ -154,8 +153,8 @@ namespace AppleHills.UI.CardSystem
|
||||
_pageController.PushPage(mainMenuPage);
|
||||
|
||||
// Clear notification
|
||||
if (notificationDot != null)
|
||||
notificationDot.SetActive(false);
|
||||
if (boosterNotificationDot != null)
|
||||
boosterNotificationDot.gameObject.SetActive(false);
|
||||
|
||||
_hasUnseenCards = false;
|
||||
}
|
||||
@@ -269,13 +268,13 @@ namespace AppleHills.UI.CardSystem
|
||||
/// </summary>
|
||||
private void UpdateBoosterCount(int count)
|
||||
{
|
||||
if (boosterCountText != null)
|
||||
if (boosterNotificationDot != null)
|
||||
{
|
||||
boosterCountText.text = count.ToString();
|
||||
boosterNotificationDot.SetCount(count);
|
||||
|
||||
// Animate the text for feedback
|
||||
boosterCountText.transform.localScale = Vector3.one * 1.2f;
|
||||
Tween.LocalScale(boosterCountText.transform, Vector3.one, 0.3f, 0f);
|
||||
boosterNotificationDot.transform.localScale = Vector3.one * 1.2f;
|
||||
Tween.LocalScale(boosterNotificationDot.transform, Vector3.one, 0.3f, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -299,8 +298,8 @@ namespace AppleHills.UI.CardSystem
|
||||
_pageController.CurrentPage != boosterOpeningPage)
|
||||
{
|
||||
_hasUnseenCards = true;
|
||||
if (notificationDot != null)
|
||||
notificationDot.SetActive(true);
|
||||
if (boosterNotificationDot != null)
|
||||
boosterNotificationDot.gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
Logging.Debug($"[CardAlbumUI] New card collected: {card.Name}");
|
||||
|
||||
Reference in New Issue
Block a user