加入用户最近100场战绩记录并实现展示
This commit is contained in:
@@ -5,6 +5,7 @@ using UnityEngine;
|
||||
public class InGamePerformanceManager : MonoBehaviour
|
||||
{
|
||||
public static InGamePerformanceManager Instance { get; private set; }
|
||||
public int HighestComboThisRun { get; private set; }
|
||||
|
||||
[Header("Inspector")]
|
||||
[Tooltip("Achievement definitions loaded from Resources.")]
|
||||
@@ -37,6 +38,7 @@ public class InGamePerformanceManager : MonoBehaviour
|
||||
if (Instance == null)
|
||||
{
|
||||
Instance = this;
|
||||
HighestComboThisRun = 0;
|
||||
LoadAchievementLibrary();
|
||||
}
|
||||
else
|
||||
@@ -98,6 +100,11 @@ public class InGamePerformanceManager : MonoBehaviour
|
||||
|
||||
public void UpdateCombo(int currentCombo)
|
||||
{
|
||||
if (currentCombo > HighestComboThisRun)
|
||||
{
|
||||
HighestComboThisRun = currentCombo;
|
||||
}
|
||||
|
||||
CheckAchievementsByCategory(AchievementCategory.Combo, currentCombo);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user