尝试修改丢text的情况

This commit is contained in:
SoulliesOfficial
2025-12-14 00:51:34 -05:00
parent c260d0740c
commit e60ef64d01
12 changed files with 151 additions and 19 deletions

View File

@@ -50,7 +50,7 @@ namespace Continentis.MainGame.UI
card.user = CombatMainManager.Instance.currentCharacter;
card.RefreshCardAttributes();
buttonText.text = "Team";
teamPileText.gameObject.SetActive(true);
UpdateTeamPileText(card.user.team);
});
}));
@@ -72,7 +72,7 @@ namespace Continentis.MainGame.UI
CombatUIManager.Instance.combatMainPage.ClearAllCardViews();
playerHero.deckSubmodule.SetUpHandCardViews();
buttonText.text = "Hero";
teamPileText.gameObject.SetActive(false);
UpdateTeamPileText(playerHero.team);
}));
seq.AppendInterval(0.1f);
seq.Append(CombatUIManager.Instance.combatMainPage.handPile.rectTransform.DOAnchorPosY(80f, 0.2f));
@@ -87,13 +87,17 @@ namespace Continentis.MainGame.UI
public void UpdateTeamPileText(CombatTeam team)
{
int currentCardCount = team.deckSubmodule.HandPile.Count;
Debug.Log($"Current team hand pile count: {currentCardCount}");
gameObject.SetActive(currentCardCount != 0);
if (isTeam)
{
gameObject.SetActive(true);
}
else
{
gameObject.SetActive(currentCardCount != 0);
}
teamPileText.text = $"{currentCardCount}/10";
Debug.Log($"Updated team pile text: {teamPileText.text}");
}
}
}