Menus Fixes

This commit is contained in:
GamerClassN7
2021-01-31 04:34:54 +01:00
parent 342e41379c
commit a91cb8a6ac
3 changed files with 15 additions and 12 deletions

View File

@@ -9,9 +9,10 @@ using TMPro;
public class MainMenu : MonoBehaviour
{
public TMPro.TextMeshProUGUI ScoreText;
public TMPro.TextMeshProUGUI ScoreText = null;
public TMPro.TextMeshProUGUI ScoreOneLineText = null;
public InputField name;
public TMPro.TextMeshProUGUI score;
// Start is called before the first frame update
void Start()
@@ -21,8 +22,10 @@ public class MainMenu : MonoBehaviour
// Update is called once per frame
void Update()
{
if (score != null)
score.text = "Score: " + DataManager.Score().ToString();
if (ScoreOneLineText != null){
Debug.Log("Score 2 ");
ScoreOneLineText.text = "Score: " + DataManager.Score().ToString();
}
}
public void PlayGame()