Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
        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);
        }