| 1234567891011121314151617181920212223242526272829 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class AgreementView : MonoBehaviour
- {
- public void EnterUserAgreement() {
- GetTitleText().text = "用户协议";
- GetContentText().text = "\n" + GetContentText("1").text;;
- }
- public void EnterPrivacyAgreement() {
- GetTitleText().text = "隐私政策";
- GetContentText().text = "\n" + GetContentText("2").text;
- }
- Text GetTitleText() {
- return transform.Find("Title").GetComponent<Text>();
- }
- Text GetContentText(string id = "") {
- return transform.Find("ScrollView/Viewport/Content" + id).GetComponent<Text>();
- }
- public void Back() {
- Destroy(gameObject);
- }
- }
|