예제 #1
0
        public void OnExit(DoButton doButton)
        {
            _isOverButton = false;

            _tween.Kill();
            _tween = doButton.Images[0].DOColor(_originalcolor, 0.42f);
        }
예제 #2
0
 // On up is special... We call back to doButton to check for a clickEvent
 // That is, if Up happened when the mouse (or finger) was over the button... That's a CLICK.
 // doButton will Pop() the Stack and Do() the Action
 public void OnUp(DoButton doButton)
 {
     _tween.Kill();
     _tween = DOTween.Sequence()
              .Join(doButton.Images[0].transform.DOScale(Vector3.one, 0.42f))
              .Join(doButton.Images[0].DOColor(DecideColor(), 0.42f))
              .OnComplete(doButton.Execute);
 }
예제 #3
0
        public void OnExit(DoButton doButton)
        {
            _isOverButton = false;

            _tween.Kill();
            _tween = doButton.Transform.DOScale(1, 0.2f)
                     .OnComplete(() => doButton.Transform.SetSiblingIndex(_siblingIndex));
        }
예제 #4
0
        public void OnDown(DoButton doButton)
        {
            var growthVector = new Vector3(1 + Growth * 0.1f, 1 + Growth * 0.1f, 1);

            _tween.Kill();
            _tween = DOTween.Sequence()
                     .Join(doButton.Images[0].transform.DOScale(growthVector, 0.42f))
                     .Join(doButton.Images[0].DOColor(HiLiteToo, 0.42f));
        }
예제 #5
0
        public void OnEnter(DoButton doButton)
        {
            _isOverButton = true;

            if (_tween != null && _tween.IsActive())
            {
                _tween.Kill();
            }
            doButton.Transform.SetAsLastSibling();
            Pulsate(doButton);
        }
예제 #6
0
        public void OnUp(DoButton doButton)
        {
            _tween.Kill();
            _tween = doButton.Transform.DOLocalRotate(Vector3.zero, 0.2f)
                     .OnComplete(() =>
            {
                if (_isOverButton)
                {
                    _tween = doButton.Transform.DOScale(Vector3.one, 0.2f)
                             .OnComplete(() => Pulsate(doButton));
                }

                doButton.Execute();
            });
        }
예제 #7
0
        public void OnEnter(DoButton doButton)
        {
            _isOverButton = true;

            if (_originalcolor.Equals(DummyColor))
            {
                _originalcolor = doButton.Images[0].color;
            }
            // For any other Handler to fire, OnEnter HAS to have occured,
            // Therefore we only need check for null here
            if (_tween != null && _tween.IsActive())
            {
                _tween.Kill();
            }
            _tween = doButton.Images[0].DOColor(HiLiteColor, 0.42f);
        }
예제 #8
0
 public void Do(DoButton doButton)
 {
     Debug.Log(_message);
 }
예제 #9
0
 private void Pulsate(DoButton doButton)
 {
     _tween = doButton.Transform.DOScale(1.5f, 0.3f)
              .SetLoops(-1, LoopType.Yoyo)
              .SetEase(Ease.OutCubic);
 }
예제 #10
0
 public void OnDown(DoButton doButton)
 {
     _tween.Kill();
     _tween = doButton.Transform.DOLocalRotate(new Vector3(0, 0, 180), 0.2f);
 }