You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
87 lines
1.9 KiB
87 lines
1.9 KiB
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using LzFramework.UI;
|
|
namespace DisComputer
|
|
{
|
|
public class IdleView : TTUIPage
|
|
{
|
|
|
|
|
|
private PcTypeSelectPage selectPage;
|
|
|
|
private Text title_txt;
|
|
|
|
public IdleView() : base(UIType.Fixed, UIMode.DoNothing, UICollider.None)
|
|
{
|
|
uiPath = "UIPrefabs/IdleView";
|
|
}
|
|
|
|
public override void Awake(GameObject go)
|
|
{
|
|
GameObject storeBtnGo = this.transform.Find("store_btn").gameObject;
|
|
Button button = storeBtnGo.GetComponent<Button>();
|
|
button.onClick.AddListener(OnClickStore);
|
|
|
|
GameObject selectGo = transform.Find("PcSelectType").gameObject;
|
|
selectPage = selectGo.GetComponent<PcTypeSelectPage>();
|
|
|
|
|
|
title_txt = this.transform.Find("Item/Text_title").gameObject.GetComponent<Text>();
|
|
|
|
this.transform.Find("video_btn").gameObject.GetComponent<Button>().onClick.AddListener(OnClickVideo);
|
|
}
|
|
|
|
public override void Active()
|
|
{
|
|
this.gameObject.SetActive(true);
|
|
|
|
if(MainControl.Instance.state == GameState.Load)
|
|
{
|
|
title_txt.text = "计算机组装课程";
|
|
}
|
|
else
|
|
{
|
|
title_txt.text = "计算机拆解课程";
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
public override void Hide()
|
|
{
|
|
|
|
this.gameObject.SetActive(false);
|
|
}
|
|
|
|
public override void Refresh()
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// 点击商店按钮
|
|
/// </summary>
|
|
private void OnClickStore()
|
|
{
|
|
TTUIPage.ShowPage<StoreView>();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 视频介绍
|
|
/// </summary>
|
|
private void OnClickVideo()
|
|
{
|
|
TTUIPage.ShowPage<VideoView>();
|
|
}
|
|
|
|
}
|
|
}
|
|
|