Exemple #1
0
        public void RemoveDiscreteButton()
        {
            if (_buttonHidden)
            {
                return;
            }
            if (!_discrete)
            {
                return;
            }
            _discrete = false;

            DiscreteAnimation.Stop();
            DiscreteAnimation.Reverse();
        }
Exemple #2
0
        private void Hide(float delay = 0)
        {
            DiscreteAnimation
            .SetAlpha(0f, 1f)
            .SetScale(Vector3.one * 0.8f, Vector3.one);

            float oldDelay = DiscreteAnimation.DelayToStart;

            DiscreteAnimation.DelayToStart = delay;
            DiscreteAnimation.Reverse(() =>
            {
                DiscreteAnimation.DelayToStart = oldDelay;
                gameObject.SetActive(false);
            });
        }