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()
|
public void ResetMatch()
|
||||||
{
|
{
|
||||||
CurrentMatchResult = new GameResult();
|
CurrentMatchResult = new GameResult();
|
||||||
|
StatisticsManager.G.ResetScore();
|
||||||
ResetMatchCharacters();
|
ResetMatchCharacters();
|
||||||
SetupMatchPlayerStatistics();
|
SetupMatchPlayerStatistics();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,5 +31,11 @@ namespace Managers
|
|||||||
FreeFlightScore += score;
|
FreeFlightScore += score;
|
||||||
UIManager.G.hUD.UpdateScore(FreeFlightScore);
|
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 TMPro;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
@ -36,7 +38,8 @@ public class HUD : MonoBehaviour
|
|||||||
|
|
||||||
public void UpdateScore(int newScore)
|
public void UpdateScore(int newScore)
|
||||||
{
|
{
|
||||||
if (!score.enabled)
|
if (!score.enabled
|
||||||
|
&& GameManager.G.CurrentScene == SceneEnum.FreeFlyArena)
|
||||||
score.enabled = true;
|
score.enabled = true;
|
||||||
|
|
||||||
score.text = $"Score: {newScore}";
|
score.text = $"Score: {newScore}";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user