Ejemplo n.º 1
0
        protected override void Start()
        {
            base.Start();

            if (Transform.childCount != 0)
            {
                TextTransform = Transform.GetChild(0);
                if (TextTransform != null)
                {
                    Text = TextTransform.GetComponent <Text>();
                }
            }

            Button = GetComponent <Button>();

            ButtonEffectType effect = SetButtonEffect();

            ButtonEffect = ButtonManager.Instance.GetEffect(effect, this);
            var action = AddMethod();

            Button.onClick.AddListener(() => action());
        }