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); } }
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); }
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)); }
private void Scale() { var scaleData = AnimUtils.GetScaleAnimData(0.01f, 1f, 0.2f, EaseType.EaseInOutQuartic, GetComponent <RectTransform>()); gameObject.GetOrAdd <Vector2Animator>().StartAnimation(scaleData); }
private void ScaleOut() => gameObject.GetOrAdd <Vector2Animator>().StartAnimation( AnimUtils.GetScaleAnimData(0.95f, 1, 0.15f, EaseType.EaseInOutCubic, gameObject.GetComponent <RectTransform>()) );