33 lines
690 B
C#
33 lines
690 B
C#
using UnityEngine;
|
|
using UnityEngine.EventSystems;
|
|
using UnityEngine.UI;
|
|
|
|
public class subCategoryShop : MonoBehaviour, IPointerClickHandler, IEventSystemHandler
|
|
{
|
|
[HideInInspector]
|
|
public Text nameText;
|
|
|
|
public string sortingName = "";
|
|
|
|
public ShopManager.Categories category;
|
|
|
|
private ShopManager shopManager;
|
|
|
|
private void Start()
|
|
{
|
|
nameText = GetComponent<Text>();
|
|
shopManager = Object.FindObjectOfType<ShopManager>();
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
}
|
|
|
|
public void OnPointerClick(PointerEventData pointerEventData)
|
|
{
|
|
shopManager.categories = category;
|
|
shopManager.currentSubCategory = base.gameObject;
|
|
StartCoroutine(shopManager.ShowItemsFromSort(sortingName));
|
|
}
|
|
}
|