Ejemplo n.º 1
0
            public bool GoToNextChoice(out PrologueLetterAction newAction)
            {
                //Debug.Log ("PROLOGUE LETTER: Going to next choice in prologue letter page");
                bool triggeredNewAction = false;

                newAction         = null;
                LastCharDisplayed = DisplayText.Length - 1;                                                //the end of the page
                foreach (PrologueLetterAction action in LetterActions)
                {
                    //check and see if we have any actions left, and what character will
                    //trigger them if we do have one
                    if (!action.Activated)
                    {
                        if (action.TriggerCharacter < LastCharDisplayed)
                        {
                            //if the trigger character is less than the last one
                            //this action comes first
                            //we do it this way because no guarantee of correct order
                            triggeredNewAction = true;
                            newAction          = action;
                            LastCharDisplayed  = action.TriggerCharacter;
                        }
                    }
                }
                if (triggeredNewAction)
                {
                    //Debug.Log ("Skipping to action " + newAction.ReplaceString);
                }
                return(triggeredNewAction);
            }
Ejemplo n.º 2
0
            public bool GoToNextChar(out PrologueLetterAction newAction)
            {
                bool triggeredNewAction = false;

                newAction = null;

                LastCharDisplayed++;
                if (LastCharDisplayed <= FinalText.Length)
                {
                    DisplayText = FinalText.Substring(0, LastCharDisplayed);
                }
                foreach (PrologueLetterAction action in LetterActions)
                {
                    if (!action.Activated && action.TriggerCharacter == LastCharDisplayed)
                    {
                        action.Activated   = true;
                        newAction          = action;
                        triggeredNewAction = true;
                        break;
                    }
                }
                return(triggeredNewAction);
            }