fix: reset score, only show in free flight
This commit is contained in:
parent
d2c59a32eb
commit
d4829e572b
@ -320,6 +320,7 @@ namespace Managers
|
||||
public void ResetMatch()
|
||||
{
|
||||
CurrentMatchResult = new GameResult();
|
||||
StatisticsManager.G.ResetScore();
|
||||
ResetMatchCharacters();
|
||||
SetupMatchPlayerStatistics();
|
||||
}
|
||||
|
||||
@ -31,5 +31,11 @@ namespace Managers
|
||||
FreeFlightScore += score;
|
||||
UIManager.G.hUD.UpdateScore(FreeFlightScore);
|
||||
}
|
||||
|
||||
public void ResetScore()
|
||||
{
|
||||
FreeFlightScore = 0;
|
||||
UIManager.G.hUD.UpdateScore(FreeFlightScore);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,3 +1,5 @@
|
||||
using FishNet.Managing.Scened;
|
||||
using Managers;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
@ -36,7 +38,8 @@ public class HUD : MonoBehaviour
|
||||
|
||||
public void UpdateScore(int newScore)
|
||||
{
|
||||
if (!score.enabled)
|
||||
if (!score.enabled
|
||||
&& GameManager.G.CurrentScene == SceneEnum.FreeFlyArena)
|
||||
score.enabled = true;
|
||||
|
||||
score.text = $"Score: {newScore}";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user