SetUpView1.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. using UnityEngine.SceneManagement;
  6. /* 设置界面1 */
  7. public class SetUpView1 : MonoBehaviour
  8. {
  9. public void GoToGameSetupView() {
  10. AudioMgr.ins.PlayBtn();
  11. GameObject.Instantiate(Resources.Load<GameObject>("Prefabs/Views/SetUpView"), Vector3.zero, new Quaternion());
  12. }
  13. public void AboutUs() {
  14. AudioMgr.ins.PlayBtn();
  15. PopupMgr.ins.ShowTip("关于我们-智能弓箭App!");
  16. }
  17. public void GoToUserAgreement() {
  18. AudioMgr.ins.PlayBtn();
  19. GameObject o = GameObject.Instantiate(Resources.Load<GameObject>("Prefabs/Views/AgreementView"));
  20. o.GetComponent<AgreementView>().EnterUserAgreement();
  21. }
  22. public void GoToPrivacyAgreement() {
  23. AudioMgr.ins.PlayBtn();
  24. GameObject o = GameObject.Instantiate(Resources.Load<GameObject>("Prefabs/Views/AgreementView"));
  25. o.GetComponent<AgreementView>().EnterPrivacyAgreement();
  26. }
  27. public void QuitGame() {
  28. AudioMgr.ins.PlayBtn();
  29. Application.Quit();
  30. }
  31. public void QuitLogin()
  32. {
  33. AudioMgr.ins.PlayBtn();
  34. PlayerPrefs.DeleteKey("IdAndToken");
  35. SceneManager.LoadScene("Login", LoadSceneMode.Single);
  36. if (UserPlayer.ins != null) UserPlayer.ins.Close();
  37. }
  38. public void Back() {
  39. AudioMgr.ins.PlayBtn();
  40. Destroy(this.gameObject);
  41. }
  42. }