public void OnPointerClick(PointerEventData eventData) { if (selected != null) { selected.Reset(); } selected = this; color.a = 0.6f; image.color = color; arrow.gameObject.SetActive(true); if (OnRollItemSelected != null) { OnRollItemSelected.Invoke(id); } }
public void Init(Structs.Stage stage) { text.text = stage.name; id = stage.id; if (stage.floors != null) { foreach (var floor in stage.floors) { RollItem rollItem = Instantiate(rollItemPrefab, itemsParent); rollItem.Init(floor); rollItems.Add(rollItem); } } rectTransform = GetComponent <RectTransform>(); initialHeight = rectTransform.sizeDelta.y; OpenClose(false); }