66 lines
1.5 KiB
C#
66 lines
1.5 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class UIProgressItem : MonoBehaviour
|
|
{
|
|
public Button playBtn;
|
|
public Button moreBtn;
|
|
public TextMeshProUGUI titleTxt;
|
|
public Image bg;
|
|
public Image noBegin;
|
|
public DataItem data;
|
|
public bool isisShow;
|
|
private void Awake()
|
|
{
|
|
playBtn.onClick.AddListener(Show);
|
|
moreBtn.onClick.AddListener(ShowMore);
|
|
}
|
|
|
|
private void Show()
|
|
{
|
|
DataManager.Instance.currentData = data;
|
|
string[] str = data.haveProjectId.Split(',');
|
|
DataManager.Instance.currentDisDistance.Clear();
|
|
for (int i = 0; i < str.Length; i++)
|
|
{
|
|
DataManager.Instance.currentDisDistance.Add(int.Parse(str[i]), i == 0 ? true : false);
|
|
}
|
|
DataManager.Instance.currentDisDistance.Add(7007, false);
|
|
|
|
UIManager.Instance.CloseAllUI();
|
|
UIManager.Instance.OpenUI(UIType.UITalkMain);
|
|
DataManager.Instance.GetGameData().ShowTalkMan();
|
|
}
|
|
|
|
public void CloseBG()
|
|
{
|
|
bg.gameObject.SetActive(false);
|
|
}
|
|
|
|
private void ShowMore()
|
|
{
|
|
}
|
|
|
|
public void SetCantClick(bool isShow)
|
|
{
|
|
isisShow = isShow;
|
|
noBegin.gameObject.SetActive(isShow);
|
|
playBtn.interactable = !isShow;
|
|
}
|
|
|
|
public void SetTitle(string title)
|
|
{
|
|
titleTxt.text = title;
|
|
}
|
|
|
|
public void SetData(DataItem item)
|
|
{
|
|
this.data = item;
|
|
|
|
}
|
|
}
|