Advertisement
Guest User

Untitled

a guest
Aug 29th, 2017
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5.  
  6. public class GetScore : MonoBehaviour {
  7.  
  8. public int arrayPosition = 0;
  9. dreamloLeaderBoard dl;
  10.  
  11. void Start()
  12. {
  13. dl = dreamloLeaderBoard.GetSceneDreamloLeaderboard();
  14. displayScore();
  15. }
  16.  
  17.  
  18. void displayScore()
  19. {
  20.  
  21. dreamloLeaderBoard.Score[] scoreList = dl.ToScoreArray();
  22.  
  23. foreach (dreamloLeaderBoard.Score currentScore in scoreList)
  24. {
  25. if (scoreList == null)
  26. Debug.Log("none");
  27. //string scoreToSeconds = (currentScore.score * 3).ToString();
  28. //string secondsToMinutes = (int.Parse(scoreToSeconds) / 60).ToString();
  29. //string minutesToHours = (int.Parse(secondsToMinutes) / 60).ToString();
  30. //
  31. //Debug.Log(minutesToHours.ToString() + ":" + secondsToMinutes + ":" + scoreToSeconds);
  32. //Debug.Log(currentScore.score + currentScore.playerName);
  33. //
  34. //gameObject.GetComponent<Text>().text = currentScore.playerName + "-" + minutesToHours + ":" + secondsToMinutes + ":" + scoreToSeconds;
  35. }
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement