Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class GetScore : MonoBehaviour {
- public int arrayPosition = 0;
- dreamloLeaderBoard dl;
- void Start()
- {
- dl = dreamloLeaderBoard.GetSceneDreamloLeaderboard();
- displayScore();
- }
- void displayScore()
- {
- dreamloLeaderBoard.Score[] scoreList = dl.ToScoreArray();
- foreach (dreamloLeaderBoard.Score currentScore in scoreList)
- {
- if (scoreList == null)
- Debug.Log("none");
- //string scoreToSeconds = (currentScore.score * 3).ToString();
- //string secondsToMinutes = (int.Parse(scoreToSeconds) / 60).ToString();
- //string minutesToHours = (int.Parse(secondsToMinutes) / 60).ToString();
- //
- //Debug.Log(minutesToHours.ToString() + ":" + secondsToMinutes + ":" + scoreToSeconds);
- //Debug.Log(currentScore.score + currentScore.playerName);
- //
- //gameObject.GetComponent<Text>().text = currentScore.playerName + "-" + minutesToHours + ":" + secondsToMinutes + ":" + scoreToSeconds;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement