34 lines
839 B
C#
34 lines
839 B
C#
using Darkmatter.Domain;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace Darkmatter.Presentation
|
|
{
|
|
public class LeaderBoardView : MonoBehaviour
|
|
{
|
|
public GameObject leaderBoardScreen;
|
|
public Button ExitButton;
|
|
public Transform LBDataContainer;
|
|
public LeaderboardData LBplayerData;
|
|
|
|
public void Show()
|
|
{
|
|
leaderBoardScreen.SetActive(true);
|
|
}
|
|
|
|
public void UpdateData(int rank,string name, string score)
|
|
{
|
|
LeaderboardData data = Instantiate(LBplayerData, LBDataContainer);
|
|
data.posNumber.text = rank.ToString();
|
|
data.playerName.text = name;
|
|
data.playerScore.text = score;
|
|
}
|
|
|
|
public void Hide()
|
|
{
|
|
leaderBoardScreen.SetActive(false);
|
|
}
|
|
}
|
|
}
|