MyBook/Assets/script/OnePageThree.cs
2025-03-22 15:17:36 +08:00

90 lines
2.8 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class OnePageThree : MonoBehaviour
{
public Button btnDMZhou;
public Button btnDMZhouRight;
public Button btnFanChuan;
public Button btnLunchuang;
public Button btnqianting;
public Button btndumozhou;
private void OnEnable()
{
Debug.Log(GameManager.Instance.infoTGo.text);
GameManager.Instance.infoTGo.text = GameManager.Instance.infoShow.ParseClickableText("你好啊,我是你的助手小知\r\n你想了解什么呢?\r\n高亮的部分可以点击哦!\r\n快来跟我一起学习吧\r\n\n\n[我想进入上一阶段的学习]\r\n[我结束今天的学习]");
}
private void Awake()
{
btnDMZhou.onClick.AddListener(OnbtnDMZhouClick);
btnDMZhouRight.onClick.AddListener(OnbtnDMZhouRightClick);
btnFanChuan.onClick.AddListener(OnbtnFanChuanClick);
btnLunchuang.onClick.AddListener(OnbtnLunchuangClick);
btnqianting.onClick.AddListener(OnbtnqiantingClick);
btndumozhou.onClick.AddListener(OnbtndumozhouClick);
}
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
private void OnbtnDMZhouClick()
{
EnterPageThree();
GameManager.Instance.Shop.gameObject.SetActive(true);
GameManager.Instance.SetActiveShop(3);
GameManager.Instance.ImgMask.SetActive(true);
}
private void OnbtnDMZhouRightClick()
{
EnterPageThree();
GameManager.Instance.Shop.gameObject.SetActive(true);
GameManager.Instance.SetActiveShop(0);
GameManager.Instance.ImgMask.SetActive(true);
}
private void OnbtnFanChuanClick()
{
EnterPageThree();
GameManager.Instance.Shop.gameObject.SetActive(true);
GameManager.Instance.SetActiveShop(2);
GameManager.Instance.ImgMask.SetActive(true);
}
private void OnbtnLunchuangClick()
{
EnterPageThree();
GameManager.Instance.Shop.gameObject.SetActive(true);
GameManager.Instance.SetActiveShop(1);
GameManager.Instance.ImgMask.SetActive(true);
}
private void OnbtnqiantingClick()
{
EnterPageThree();
GameManager.Instance.Shop.gameObject.SetActive(true);
GameManager.Instance.SetActiveShop(4);
GameManager.Instance.ImgMask.SetActive(true);
}
private void OnbtndumozhouClick()
{
EnterPageThree();
GameManager.Instance.Shop.gameObject.SetActive(true);
GameManager.Instance.SetActiveShop(3);
GameManager.Instance.ImgMask.SetActive(true);
}
private void EnterPageThree()
{
GameManager.Instance.infoTGo.text = GameManager.Instance.infoShow.ParseClickableText("小船可手动翻转查看结构哦\n\n\n[我想进入上一阶段的学习]\r\n[我结束今天的学习]");
}
}