示例#1
0
    private IEnumerator ExecuteCoroutine()
    {
        isTweening = true;

        objectTweens.Add(circleImage.DOFade(1.0f, 0.25f));

        for (int i = 0; i < rectangleImages.Length; i++)
        {
            rectangleImages[i].DOFade(1.0f, 0.25f);
            if (i % 2 == 0)
            {
                objectTweens.Add(rectangleImages[i].gameObject.transform.DORotate(leftRotateVector, 0.35f, RotateMode.FastBeyond360));
            }
            else
            {
                objectTweens.Add(rectangleImages[i].gameObject.transform.DORotate(rightRotateVector, 0.25f, RotateMode.FastBeyond360));
            }
        }

        objectTweens.Add(circleImage.gameObject.transform.DOScale(sizeUpScale, 0.35f));

        yield return(YieldInstructionCache.WaitingSeconds(0.25f));

        for (int i = 0; i < rectangleImages.Length; i++)
        {
            objectTweens.Add(rectangleImages[i].DOFade(0, 0.25f));
        }

        objectTweens.Add(circleImage.DOFade(0, 0.25f));


        yield return(YieldInstructionCache.WaitingSeconds(0.5f));

        ObjectOff();
    }
示例#2
0
    private IEnumerator Start()
    {
        sequence = DOTween.Sequence()
                   .AppendCallback(() => sign.color = Color.clear)
                   .AppendInterval(0.5F)
                   .AppendCallback(() =>
        {
            sign.SetNativeSize();
            sign.color = Color.white;
        })
                   .AppendInterval(0.5F)
                   .Append(sign.DOFade(0F, 0.5F))
                   .SetAutoKill(false);

        while (true)
        {
            float waitingTime = Random.Range(2, 9);
            yield return(YieldInstructionCache.WaitingSeconds(waitingTime));

            shouldRenew = false;

            DogFactory.SetRandomDog(this);
            image.DOFade(1F, 0.5F);
            tween = DOVirtual.DelayedCall(8F, () => shouldRenew = true).Play();

            yield return(new WaitUntil(() => shouldRenew));

            image.DOFade(0F, 0.5F);
            tween.Kill();
            Index = -1;
        }
    }
示例#3
0
 private IEnumerator BackgroundChangeCoroutine()
 {
     while (true)
     {
         backgroundColorChangeEvent.Invoke();
         yield return(YieldInstructionCache.WaitingSeconds(5.0f));
     }
 }
示例#4
0
 private IEnumerator UpdateCoroutine()
 {
     while (true)
     {
         uiController.ChangeBackgroundColor();
         yield return(YieldInstructionCache.WaitingSeconds(5.0f));
     }
 }
示例#5
0
 private IEnumerator UpdateCoroutine()
 {
     while (true)
     {
         NodeGenerate();
         yield return(YieldInstructionCache.WaitingSeconds(0.2f));
     }
 }
示例#6
0
    private IEnumerator StarFallGenerateCoroutine()
    {
        while (true)
        {
            yield return(YieldInstructionCache.WaitingSeconds(0.75f));

            GenerateStarFall();
        }
    }
示例#7
0
    private IEnumerator ResumeCoroutine()
    {
        fadeTween?.Kill();

        fadeTween = canvasGroup.DOFade(0.0f, 1.0f);
        yield return(YieldInstructionCache.WaitingSeconds(1.0f));

        gameObject.SetActive(false);
        GameManager.instance.isPause = false;
        doingCoroutine = false;
    }
    private IEnumerator PlayCoroutine()
    {
        for (int i = 0; i < counts.Length; i++)
        {
            counts[i].SetActive(true);
            yield return(YieldInstructionCache.WaitingSeconds(interval));

            counts[i].SetActive(false);
        }
        onCountdown?.Invoke();
    }
示例#9
0
    private IEnumerator JudgeImageSizeUpCoroutine()
    {
        judgeImage.gameObject.SetActive(true);
        judgeImage.gameObject.transform.localScale = Vector3.one;

        sizeUpTween = judgeImage.gameObject.transform.DOScale(sizeUpVector * sizeUpValue, sizeUpDuration).SetEase(easeType);
        yield return(sizeUpTween.WaitForCompletion());

        yield return(YieldInstructionCache.WaitingSeconds(1.0f));

        judgeImage.gameObject.SetActive(false);
    }
示例#10
0
    private IEnumerator ExecuteCoroutine()
    {
        isTweening = true;
        for (int i = 0; i < rhombusLists.Count; i++)
        {
            TweenCoroutine(rhombusLists[i]).Start(this);
            objectTweens.Add(rhombusLists[i].gameObject.transform.DOScale(1, 0.75f));

            yield return(YieldInstructionCache.WaitingSeconds(0.03f));
        }

        yield return(objectTweens[objectTweens.Count - 1].WaitForCompletion());

        yield return(YieldInstructionCache.WaitingSeconds(0.25f));

        ObjectReset();
        ObjectOff();
    }
示例#11
0
    IEnumerator QuaterTouch()
    {
        yield return(YieldInstructionCache.WaitingSeconds(0.5f));

        gameObject.SetActive(false);
    }