예제 #1
0
 public void LoadingAnimation(float hasLoadPercent, float deltaTime)
 {
     targetPercent = hasLoadPercent;
     if (hasLoadPercent < 1 && !isPlaying)
     {
         isPlaying = true;
         upBlock.rectTransform.DOSizeDelta(new Vector2(1920f, 541f), 0.3f);
         downBlock.rectTransform.DOSizeDelta(new Vector2(1920f, 541f), 0.3f);
         spritePlayer.AlphaPlayForward();
     }
     else if (hasLoadPercent == 1)
     {
     }
 }
    public override void  SetPercent()
    {
        base.SetPercent();
        smoothPercent = Mathf.Lerp(smoothPercent, asy.isDone ? 1.0f : asy.progress, 0.33f);
//        smoothPercent = asy.progress;
        if (!asy.isDone && smoothPercent > 0.001f)
        {
            if (oneTimePercent)
            {
                oneTimePercent = false;
                loadingRing.rectTransform.anchoredPosition = new Vector2(5000, 0);
                slider.transform.localScale = new Vector3(1, 1, 1);
                spritePlayer.AlphaPlayForward();
            }


            text.text        = request.helpInfo;
            percentText.text = " " + Mathf.Clamp((int)(smoothPercent * 122.22222), 0, 100).ToString() + " %";
            slider.value     = smoothPercent * 1.2222f;
        }
    }