Ejemplo n.º 1
0
        CircleButton CreateButton()
        {
            CircleButton button = Instantiate(buttonPrefab).GetComponent <CircleButton>();

            button.transform.SetParent(transform, false);

            return(button);
        }
Ejemplo n.º 2
0
        public void Clear(System.Action onClearAnimationCompleted = null, float startDelay = 0)
        {
            for (int i = 0; i < buttons.Count; i++)
            {
                CircleButton button = buttons[i];

                button.Destroy(startDelay + i * 0.1f, i == buttons.Count - 1 ? onClearAnimationCompleted : null);
            }

            buttons.Clear();
        }
Ejemplo n.º 3
0
        public CircleButton AddButton(ILivingLetterData letterData, System.Action <CircleButton> onClicked, float enterAnimationDelay)
        {
            CircleButton button = CreateButton();

            button.Answer    = letterData;
            button.onClicked = onClicked;
            button.ImageMode = ImageMode;
            buttons.Add(button);
            button.DoEnterAnimation(enterAnimationDelay);
            button.Active = Active;
            dirty         = true;

            return(button);
        }