Example #1
0
    IEnumerator DoRockResult()
    {
        //fill rock list widget
        rockResultWidget.Init(mRockResultList, null);

        yield return(rockResultSequence.Enter());

        //check which rocks have not been seen, display info for each
        for (int i = 0; i < mRockResultList.Count; i++)
        {
            var rock = mRockResultList[i];
            if (!rock.isSeen)
            {
                mRockModalParms[ModalInfo.parmInfoData] = rock;

                M8.ModalManager.main.Open(rock.modal, mRockModalParms);

                while (M8.ModalManager.main.isBusy || M8.ModalManager.main.IsInStack(rock.modal))
                {
                    yield return(null);
                }
            }
        }

        //show complete proceed if criteria is met
        if (criteria.IsComplete(inventory))
        {
            if (completeProceedGO)
            {
                completeProceedGO.SetActive(true);
            }
        }

        //wait for rock continue
        rockResultContinueButton.Select();
        mIsRockResultContinue = false;
        while (!mIsRockResultContinue)
        {
            yield return(null);
        }

        yield return(rockResultSequence.Exit());

        if (compactCementAnimator)
        {
            if (!string.IsNullOrEmpty(compactCementTakeFadeOut))
            {
                yield return(compactCementAnimator.PlayWait(compactCementTakeFadeOut));
            }

            compactCementAnimator.gameObject.SetActive(false);
        }

        StartCoroutine(DoProcessSelect());
    }
Example #2
0
    //

    IEnumerator DoRockResult()
    {
        ClearSelection();

        //fill rock list widget
        rockResultWidget.Init(mRockResultList, null);

        yield return(rockResultSequence.Enter());

        //check which rocks have not been seen, display info for each
        for (int i = 0; i < mRockResultList.Count; i++)
        {
            var rock = mRockResultList[i];
            if (!rock.isSeen)
            {
                mRockModalParms[ModalInfo.parmInfoData] = rock;

                M8.ModalManager.main.Open(rock.modal, mRockModalParms);

                while (M8.ModalManager.main.isBusy || M8.ModalManager.main.IsInStack(rock.modal))
                {
                    yield return(null);
                }
            }
        }

        criteria.signalUpdateIgneous.Invoke();

        //show complete proceed if criteria is met
        if (criteria.IsComplete(inventory))
        {
            if (completeProceedGO)
            {
                completeProceedGO.SetActive(true);
            }
        }

        //wait for rock continue

        exitButton.Select();
        //rockResultContinueButton.Select();

        mIsRockResultContinue = false;
        while (!mIsRockResultContinue)
        {
            yield return(null);
        }

        yield return(rockResultSequence.Exit());

        //clear out mode
        switch (mCurMode)
        {
        case Mode.Intrusive:
            //fade out last rock
            if (mIntrusiveRockInd < intrusiveRockDisplays.Length)
            {
                float curTime = 0f;
                while (curTime < intrusiveRockDisplayFadeOutDelay)
                {
                    yield return(null);

                    curTime += Time.deltaTime;

                    float t = Mathf.Clamp01(curTime / intrusiveRockDisplayFadeOutDelay);

                    var clr = intrusiveRockDisplays[mIntrusiveRockInd].spriteShapeColor.color;
                    clr.a = 1f - t;
                    intrusiveRockDisplays[mIntrusiveRockInd].spriteShapeColor.color = clr;
                }

                intrusiveRockDisplays[mIntrusiveRockInd].rootGO.SetActive(false);
            }
            break;

        case Mode.Extrusive:
            if (extrusiveAnimator && !string.IsNullOrEmpty(extrusiveTakeClear))
            {
                yield return(extrusiveAnimator.PlayWait(extrusiveTakeClear));
            }
            break;
        }

        StartCoroutine(DoProcessSelect(false));
    }