Пример #1
0
    private IEnumerator DisplatStrings(string stringToDisplay)
    {
        int stringLength         = stringToDisplay.Length;
        int currentCaracterIndex = 0;

        HideIcons();
        _textComponent.text = "";
        while (currentCaracterIndex < stringLength)
        {
            _textComponent.text += stringToDisplay[currentCaracterIndex];
            currentCaracterIndex++;
            if (currentCaracterIndex < stringLength)
            {
                if (InputManager_JHW.BButton())
                {
                    yield return(new WaitForSeconds(CharacterRateMultuplier));
                }
                else
                {
                    yield return(new WaitForSeconds(SecondsBetweenCharacters));
                }
            }
            else
            {
                break;
            }
        }
        ShowIcon();
        while (true)
        {
            if (InputManager_JHW.BButtonDown())
            {
                if (_isEndofDialogue)
                {
                    dia_Play.setEnd(true);
                    if (WaveStart.Length > 0)
                    {
                        myState.SetMyState(PlayerState.State.Nomal);
                        dia_Play.setPlay(true);
                        if (WaveStart[wavecnt] != null)
                        {
                            Debug.Log(WaveStart[wavecnt]);
                            WaveStart[wavecnt].GetComponent <MobGenerater>().Wave_Start = true;
                            wavecnt++;
                        }
                        else
                        {
                            Debug.Log(WaveStart[wavecnt]);
                        }
                    }
                }
                break;
            }
            yield return(0);
        }
        HideIcons();
        _isStringBeingRevealed = false;
        _textComponent.text    = "";
        if (_isEndofDialogue)
        {
            _isEndofDialogue = false;
            dia_Play.setPlay(true);
        }
    }