TimeLimitGameView.cs 779 B

12345678910111213141516171819202122232425262728293031
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. using UnityEngine.SceneManagement;
  6. public class TimeLimitGameView : MonoBehaviour
  7. {
  8. public Text nickNameTxt;
  9. public Text highestScoreTxt;
  10. public Text currentScoreTxt;
  11. public Text timeTxt;
  12. TimeLimitGameMode gameMode;
  13. public static TimeLimitGameView ins;
  14. void Start()
  15. {
  16. ins = this;
  17. gameMode = (TimeLimitGameMode) GameMgr.ins.gameMode;
  18. nickNameTxt.text = LoginMgr.myUserInfo.nickname;
  19. highestScoreTxt.text = LoginMgr.myUserInfo.timeLimitGameHighestScore.ToString();
  20. }
  21. void Update()
  22. {
  23. timeTxt.text = gameMode.GetTimeStr();
  24. currentScoreTxt.text = gameMode.score.ToString();
  25. }
  26. }