NewMyBook/Assets/script/OnePageThree.cs
2025-03-28 16:07:42 +08:00

95 lines
2.9 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()
{
GameManager.Instance.PageTHree=true;
GameManager.Instance.infoTGo.text = GameManager.Instance.infoShow.ParseClickableText("你好啊,我是你的助手小知\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[我结束今天的学习]");
}
private void OnDisable()
{
GameManager.Instance.PageTHree=false;
}
}