예제 #1
0
 private void UpdateMegaTextObject()
 {
     if (manager != null)
     {
         var mgrLevel = Services.ManagerService.GetManagerEfficiencyRollbackLevel(manager.Id);
         if (mgrLevel.IsMega)
         {
             megaTextObject?.Activate();
             if (megaTextObject != null)
             {
                 var scaleData1 = AnimUtils.GetScaleAnimData(1, 1.2f, 0.5f, EaseType.EaseInOutQuad, megaTextObject.GetComponent <RectTransform>(), () => {
                     var scaleData2 = AnimUtils.GetScaleAnimData(1.2f, 1, 0.5f, EaseType.EaseInOutQuad, megaTextObject.GetComponent <RectTransform>());
                     megaTextObject.GetOrAdd <Vector2Animator>().StartAnimation(scaleData2);
                 });
                 megaTextObject.GetOrAdd <Vector2Animator>().StartAnimation(scaleData1);
             }
             ToggleAdditionalObjects(true);
         }
         else
         {
             megaTextObject?.Deactivate();
             ToggleAdditionalObjects(false);
         }
     }
     else
     {
         megaTextObject?.Deactivate();
         ToggleAdditionalObjects(false);
     }
 }
예제 #2
0
    private void ScaleTitle()
    {
        var data1 = AnimUtils.GetScaleAnimData(1, 1.1f, 0.4f, EaseType.EaseInOutSin, titleObject.GetComponent <RectTransform>(), () => {
            var data2 = AnimUtils.GetScaleAnimData(1.1f, 1, 0.4f, EaseType.EaseInOutSin, titleObject.GetComponent <RectTransform>());
            titleObject.GetOrAdd <Vector2Animator>().StartAnimation(data2);
        });

        titleObject.GetOrAdd <Vector2Animator>().StartAnimation(data1);
    }
예제 #3
0
 private void AnimateToggleIcon(RectTransform target)
 {
     foreach (var anim in ToggleIconAnimators)
     {
         anim.Stop();
     }
     target.gameObject.GetOrAdd <Vector2Animator>().StartAnimation(AnimUtils
                                                                   .GetScaleAnimData(1, 1.15f, 1, EaseType.EaseInOutQuad, target)
                                                                   .AsAnimationMode(BosAnimationMode.PingPong));
 }
예제 #4
0
        private void Scale()
        {
            var scaleData = AnimUtils.GetScaleAnimData(0.01f, 1f, 0.2f, EaseType.EaseInOutQuartic, GetComponent <RectTransform>());

            gameObject.GetOrAdd <Vector2Animator>().StartAnimation(scaleData);
        }
예제 #5
0
 private void ScaleOut()
 => gameObject.GetOrAdd <Vector2Animator>().StartAnimation(
     AnimUtils.GetScaleAnimData(0.95f, 1, 0.15f, EaseType.EaseInOutCubic, gameObject.GetComponent <RectTransform>())
     );