UnityGameProjectsCode / Rise2Point0Game / EntryInfo.cs
EntryInfo.cs
Raw
using System;
using TMPro;
using UnityEngine;

public class EntryInfo : MonoBehaviour
{
    public TextMeshProUGUI userName;
    public TextMeshProUGUI highScore;
    public TextMeshProUGUI sessionTime;

    public void SetUserName(string name)
    {
        userName.text = name;
    }

    public void SetScore(string score)
    {
        highScore.text = score;
    }

    public void SetTime(string time)
    {
        sessionTime.text = time;
    }

    public string GetName()
    {
        return userName.text;
    }

    public int GetScore()
    {
        return int.Parse(highScore.text);
    }

    public double GetTime()
    {   
        return Convert.ToDouble(sessionTime.text);
    }
}