Ejemplo n.º 1
0
        private bool DequeueAndDisplay(Screen screen)
        {
            if (this.DisplayQueue.Count > 0)
            {
                this.startShowingTime = DateTime.Now;
                GameObjectAndBranchName name = this.DisplayQueue.Dequeue();
                this.shijiantupian       = this.shijiantupianduilie.Dequeue();
                this.shijiantupianjuxing = this.juxingduilie.Dequeue();
                this.SetPosition(ShowPosition.Bottom, screen);
                this.shijianshengyin = this.shijianshengyinduilie.Dequeue();
                this.SpeakingPerson  = name.person;
                this.NameText.Text   = name.person.Name;
                if (name.TryToShowString != null && name.TryToShowString.Length > 1)
                {
                    this.TryToShowString = name.TryToShowString;
                }
                else
                {
                    this.TryToShowString = "";
                }
                if (TryToShowString != null && TryToShowString.Length > 1)
                {
                    this.SetPosition(ShowPosition.BottomLeft, screen);
                }
                this.RichText.Clear();
                if (this.diyigeshengyin)
                {
                    screen.PlayNormalSound(this.shijianshengyin);
                    this.diyigeshengyin = false;
                }

                this.RichText.Texts = name.texts;
                this.RichText.ResortTexts();
                if (name.iConfirmationDialog != null)
                {
                    this.iConfirmationDialog = name.iConfirmationDialog;
                    this.iConfirmationDialog.SetPersonTextDialog(this.iPersonTextDialog);
                    this.iConfirmationDialog.AddYesFunction(name.YesFunction);
                    this.iConfirmationDialog.AddNoFunction(name.NoFunction);
                    this.iConfirmationDialog.IsShowing = true;
                }
                else
                {
                    this.iConfirmationDialog = null;
                    this.YesFunction         = null;
                    this.NoFunction          = null;
                }
                return(false);
            }
            return(true);
        }
Ejemplo n.º 2
0
 private bool DequeueAndDisplay()
 {
     if (this.DisplayQueue.Count > 0)
     {
         this.startShowingTime = DateTime.Now;
         GameObjectAndBranchName name = this.DisplayQueue.Dequeue();
         this.SpeakingPerson = name.person;
         this.NameText.Text  = name.person.Name;
         this.RichText.Clear();
         if (name.gameObject == null)
         {
             this.RichText.AddText(name.branchName);
         }
         else
         {
             this.RichText.Texts = name.texts;
         }
         this.RichText.ResortTexts();
         if (name.iConfirmationDialog != null)
         {/*
           * this.iConfirmationDialog = name.iConfirmationDialog;
           * this.iConfirmationDialog.SetPersonTextDialog(this.iPersonTextDialog);
           * this.iConfirmationDialog.AddYesFunction(name.YesFunction);
           * this.iConfirmationDialog.AddNoFunction(name.NoFunction);
           * this.iConfirmationDialog.IsShowing = true;
           */
         }
         else
         {
             this.iConfirmationDialog = null;
             this.YesFunction         = null;
             this.NoFunction          = null;
         }
         return(false);
     }
     return(true);
 }