37 lines
552 B
C#
37 lines
552 B
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class UpperLink : MonoBehaviour
|
|
{
|
|
public Text nameText;
|
|
|
|
public int categoryIndex;
|
|
|
|
public string subCategory;
|
|
|
|
public bool useSelected = true;
|
|
|
|
private void Start()
|
|
{
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
}
|
|
|
|
public void SelectByClick()
|
|
{
|
|
if (useSelected)
|
|
{
|
|
if (subCategory == "")
|
|
{
|
|
Object.FindObjectOfType<ShopManager>().ShowCategoryAndSubCategory(categoryIndex);
|
|
}
|
|
else
|
|
{
|
|
StartCoroutine(Object.FindObjectOfType<ShopManager>().ShowItemsFromSort(subCategory));
|
|
}
|
|
}
|
|
}
|
|
}
|