示例#1
0
    // Starts the text scrolling.
    public bool StartDialogueScroll()
    {
        // Proceed until we find a dialogue we can hit.
        while (true)
        {
            if (dialogueIndex_ >= model_.Dialogue.Length)
            {
                return(false);
            }

            if (!flagManager_.GetFlagCompletion(model_.Dialogue[dialogueIndex_].PrereqFlag) ||
                !flagManager_.GetFlagUnmet(model_.Dialogue[dialogueIndex_].PrereqUnmetFlags))
            {
                GoToNext(false);
            }
            else
            {
                break;
            }
        }

        //Debug.Log("Attempgint to start dialogue scroll");
        if (ignoreNextInput_)
        {
            //Debug.Log("Can't scroll dialogue, just completed something.");
            return(false);
        }

        state_           = State.Scrolling;
        ignoreNextInput_ = true;
        //Debug.Log("Scrolling dialogue now.");
        return(true);
    }
示例#2
0
 public bool HasAvailableModel()
 {
     for (int i = soModel_.DialogueModels.Length - 1; i > -1; i--)
     {
         if (flagManager_.GetFlagCompletion(soModel_.DialogueModels[i].PrereqFlags) &&
             flagManager_.GetFlagUnmet(soModel_.DialogueModels[i].PrereqUnmetFlags))
         {
             return(true);
         }
     }
     return(false);
 }