ui基本完毕,修了一大把的bug
This commit is contained in:
@@ -6,6 +6,7 @@ using UnityEngine.UI;
|
||||
using TMPro;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections;
|
||||
using DG.Tweening;
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
#endif
|
||||
@@ -840,6 +841,12 @@ public class teamUIController : MonoBehaviour
|
||||
public TextMeshProUGUI allSum_pmScore;
|
||||
[Header("Inspector")]
|
||||
public TextMeshProUGUI allSum_idolScore;
|
||||
[Header("Inspector")]
|
||||
public Text recentPlusAmountText;
|
||||
[Header("Inspector")]
|
||||
public Image currentScoreRankImage;
|
||||
[Header("Inspector")]
|
||||
public RankConfig currentScoreRankConfig;
|
||||
|
||||
// new: runtime enemy instance and UI sync fields
|
||||
private EnemyCombatant enemyCombatantInstance;
|
||||
@@ -872,6 +879,7 @@ public class teamUIController : MonoBehaviour
|
||||
|
||||
private int combo = 0;
|
||||
public int CurrentCombo => combo;
|
||||
private Tween recentPlusAmountFadeTween;
|
||||
|
||||
public enum ComboJudgeType
|
||||
{
|
||||
@@ -1173,6 +1181,19 @@ public class teamUIController : MonoBehaviour
|
||||
{
|
||||
SpawnNextEnemy();
|
||||
}
|
||||
|
||||
if (recentPlusAmountText != null)
|
||||
{
|
||||
recentPlusAmountText.text = "+0";
|
||||
Color color = recentPlusAmountText.color;
|
||||
color.a = 0f;
|
||||
recentPlusAmountText.color = color;
|
||||
}
|
||||
|
||||
if (ScoreManager.Instance != null)
|
||||
{
|
||||
ScoreManager.Instance.RefreshAllScoreUi();
|
||||
}
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
@@ -1233,10 +1254,12 @@ public class teamUIController : MonoBehaviour
|
||||
if (IsCombo(result))
|
||||
{
|
||||
combo++;
|
||||
ResetRecentPlusAmountVisual();
|
||||
}
|
||||
else
|
||||
{
|
||||
combo = 0;
|
||||
FadeOutRecentPlusAmount();
|
||||
}
|
||||
if (comboCounter != null)
|
||||
{
|
||||
@@ -1260,6 +1283,42 @@ public class teamUIController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public void ResetRecentPlusAmountVisual()
|
||||
{
|
||||
if (recentPlusAmountText == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (recentPlusAmountFadeTween != null)
|
||||
{
|
||||
recentPlusAmountFadeTween.Kill();
|
||||
recentPlusAmountFadeTween = null;
|
||||
}
|
||||
|
||||
Color color = recentPlusAmountText.color;
|
||||
color.a = 1f;
|
||||
recentPlusAmountText.color = color;
|
||||
}
|
||||
|
||||
public void FadeOutRecentPlusAmount()
|
||||
{
|
||||
if (recentPlusAmountText == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (recentPlusAmountFadeTween != null)
|
||||
{
|
||||
recentPlusAmountFadeTween.Kill();
|
||||
}
|
||||
|
||||
recentPlusAmountFadeTween = recentPlusAmountText
|
||||
.DOFade(0f, 0.25f)
|
||||
.SetUpdate(true)
|
||||
.OnComplete(() => recentPlusAmountFadeTween = null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Documentation text normalized.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user