修复
This commit is contained in:
@@ -21,24 +21,24 @@ namespace Continentis.MainGame.UI
|
||||
|
||||
button.onClick.AddListener(() =>
|
||||
{
|
||||
isTeam = !isTeam;
|
||||
if (isTeam)
|
||||
{
|
||||
SwitchToTeam();
|
||||
buttonText.text = "Team";
|
||||
teamPileText.gameObject.SetActive(true);
|
||||
SwitchToCurrentCharacter();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
SwitchToCurrentCharacter();
|
||||
buttonText.text = "Hero";
|
||||
teamPileText.gameObject.SetActive(false);
|
||||
SwitchToTeam();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void SwitchToTeam()
|
||||
public void SwitchToTeam()
|
||||
{
|
||||
if(isTeam) return;
|
||||
isTeam = true;
|
||||
|
||||
Sequence seq = DOTween.Sequence();
|
||||
seq.Append(CombatUIManager.Instance.combatMainPage.handPile.rectTransform.DOAnchorPosY(-300f, 0.2f)
|
||||
.OnComplete(() =>
|
||||
@@ -49,6 +49,8 @@ namespace Continentis.MainGame.UI
|
||||
{
|
||||
card.user = CombatMainManager.Instance.currentCharacter;
|
||||
card.RefreshCardAttributes();
|
||||
buttonText.text = "Team";
|
||||
teamPileText.gameObject.SetActive(true);
|
||||
});
|
||||
}));
|
||||
|
||||
@@ -57,8 +59,10 @@ namespace Continentis.MainGame.UI
|
||||
seq.Play();
|
||||
}
|
||||
|
||||
private void SwitchToCurrentCharacter()
|
||||
public void SwitchToCurrentCharacter()
|
||||
{
|
||||
if(!isTeam) return;
|
||||
isTeam = false;
|
||||
if (CombatMainManager.Instance.currentCharacter is PlayerHero playerHero)
|
||||
{
|
||||
Sequence seq = DOTween.Sequence();
|
||||
@@ -67,6 +71,8 @@ namespace Continentis.MainGame.UI
|
||||
{
|
||||
CombatUIManager.Instance.combatMainPage.ClearAllCardViews();
|
||||
playerHero.deckSubmodule.SetUpHandCardViews();
|
||||
buttonText.text = "Hero";
|
||||
teamPileText.gameObject.SetActive(false);
|
||||
}));
|
||||
seq.AppendInterval(0.1f);
|
||||
seq.Append(CombatUIManager.Instance.combatMainPage.handPile.rectTransform.DOAnchorPosY(80f, 0.2f));
|
||||
@@ -81,6 +87,8 @@ 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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user