frostyfire

MainMenu

Aug 21st, 2019
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.SceneManagement;
  5. using UnityEngine.UI;
  6.  
  7. public class MainMenu : MonoBehaviour
  8. {
  9. public Text playerDisplay;
  10.  
  11. // Start is called before the first frame update
  12. void Start()
  13. {
  14. if (DBManager.LoggedIn)
  15. {
  16. playerDisplay.text = "Player: " + DBManager.username + " House: " + DBManager.house;
  17. }
  18. }
  19.  
  20. public void GoToRegister()
  21. {
  22. SceneManager.LoadScene(1);
  23. }
  24.  
  25. public void GoToLogin()
  26. {
  27. SceneManager.LoadScene(2);
  28. }
  29.  
  30. public void GoToGame()
  31. {
  32. SceneManager.LoadScene(3);
  33. }
  34. public void GoToLeaderBoard()
  35. {
  36. SceneManager.LoadScene(4);
  37. }
  38.  
  39.  
  40. }
Advertisement
Add Comment
Please, Sign In to add comment