Exemplo n.º 1
0
        private void OnPointerEnter(EBtnType btnType, bool b)
        {
            _isPointerEnter = b;
            if (!_isPointerDown)
            {
                RefreshBtnScale(btnType);
            }

            var index = (int)btnType;

            if (_cachedView.SkeletonGraphics[index].AnimationState == null)
            {
                return;
            }

            if (b)
            {
                var loop = btnType != EBtnType.Multi;
                _cachedView.SkeletonGraphics[index].AnimationState.SetAnimation(0, PointInAnimNames[index], loop);
            }
            else
            {
                if (btnType == EBtnType.Multi)
                {
                    _cachedView.SkeletonGraphics[index].AnimationState.SetAnimation(0, "OnLineClose", false);
                }
                else
                {
                    _cachedView.SkeletonGraphics[index].AnimationState.SetEmptyAnimation(0, 0.2f);
//                    track.trackTime = track.trackEnd;
                }
            }
        }
Exemplo n.º 2
0
 private void RefreshBtnScale(EBtnType btnType)
 {
     if (_isPointerDown)
     {
         SetBtnScale(btnType, 0.98f);
     }
     else if (_isPointerEnter)
     {
         SetBtnScale(btnType, 1.03f);
     }
     else
     {
         SetBtnScale(btnType, 1);
     }
 }
Exemplo n.º 3
0
 private void OnPointerDown(EBtnType type, bool b)
 {
     _isPointerDown = b;
     RefreshBtnScale(type);
 }
Exemplo n.º 4
0
 private void SetBtnScale(EBtnType type, float scale)
 {
     _cachedView.BtnRtfs[(int)type].localScale = Vector3.one * scale;
 }