SunsetHigh.Hero.DialoguePanel.update C# (CSharp) Method

update() public method

public update ( float elapsed ) : void
elapsed float
return void
            public override void update(float elapsed)
            {
                base.update(elapsed);
                cursorArrow.update(elapsed);
                if (scrollTextIndex < say.Length)
                {
                    characterAdvanceTimer += elapsed;
                    float factor = 1.0f;
                    if (scrollTextIndex > 0 && scrollTextIndex < say.Length - 2 &&
                        PUNCTUATION.Contains(say[scrollTextIndex - 1])) factor = PUNCTUATION_TIME_FACTOR;
                    if (characterAdvanceTimer > SCROLL_TEXT_TIME * factor)
                    {
                        scrollTextIndex++;
                        characterAdvanceTimer = 0.0f;
                    }
                    if (scrollTextIndex > say.Length) scrollTextIndex = say.Length;
                }
                if (scrollTextIndex == say.Length && responseShowPauseTimer < RESPONSE_SHOW_PAUSE_TIME)
                {
                    responseShowPauseTimer += elapsed;
                    if (responseShowPauseTimer > RESPONSE_SHOW_PAUSE_TIME)
                    {
                        responseShowPauseTimer = RESPONSE_SHOW_PAUSE_TIME;
                        this.unhideEntries();
                        this.cursorArrow.setVisible(this.entries.Count > 0);
                    }
                }
                if (this.entries.Count == 0 && responseShowPauseTimer == RESPONSE_SHOW_PAUSE_TIME)
                {
                    advanceArrowFlashTimer += elapsed;
                }
            }