using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using UnityEngine.SceneManagement; /* 设置界面1 */ public class SetUpView1 : MonoBehaviour { void Awake() { if (CommonConfig.needToExamine) { transform.Find("Items/GameSetup").GetComponentInChildren().SetText(1234560); transform.Find("BtnQuitGame").GetComponentInChildren().SetText(1234561); } } public void GoToGameSetupView() { AudioMgr.ins.PlayBtn(); GameObject.Instantiate(Resources.Load("Prefabs/Views/SetUpView"), Vector3.zero, new Quaternion()); } public void AboutUs() { AudioMgr.ins.PlayBtn(); // PopupMgr.ins.ShowTip(TextAutoLanguage2.GetTextByKey("tip_about-us")); GameObject.Instantiate(Resources.Load("Prefabs/Views/AboutUsView"), transform); } public void GoToUserAgreement() { AudioMgr.ins.PlayBtn(); GameObject o = GameObject.Instantiate(Resources.Load("Prefabs/Views/AgreementView")); o.GetComponent().EnterUserAgreement(); } public void GoToPrivacyAgreement() { AudioMgr.ins.PlayBtn(); GameObject o = GameObject.Instantiate(Resources.Load("Prefabs/Views/AgreementView")); o.GetComponent().EnterPrivacyAgreement(); } public void QuitGame() { AudioMgr.ins.PlayBtn(); Application.Quit(); } public void QuitLogin() { AudioMgr.ins.PlayBtn(); PlayerPrefs.DeleteKey("IdAndToken"); SceneManager.LoadScene("Login", LoadSceneMode.Single); if (UserPlayer.ins != null) UserPlayer.ins.Close(); } public void Back() { AudioMgr.ins.PlayBtn(); Destroy(this.gameObject); } }