コード例 #1
0
        public DiaboxPiece SetDialogWindow(Vector2 size)
        {
            DiaboxPiece dp = new DiaboxPiece(id++, msgpanel);

            dp.size = size;
            return(dp);
        }
コード例 #2
0
        public DiaboxPiece SetDialogWindow(Vector2 size, string filename)
        {
            DiaboxPiece dp = new DiaboxPiece(id++, msgpanel);

            dp.size     = size;
            dp.filename = filename;
            return(dp);
        }
コード例 #3
0
        public DiaboxPiece SetDialogWindow(Vector2 size, Color color)
        {
            DiaboxPiece dp = new DiaboxPiece(id++, msgpanel);

            dp.size  = size;
            dp.color = color;
            //dp.color = new Color(color.r, color.g, color.b, opacity);
            return(dp);
        }
コード例 #4
0
        public DiaboxPiece SetDialogWindow(Vector2 size, string filename, Vector2 pos, Vector4 rect, float xint = 0, float yint = 0)
        {
            DiaboxPiece dp = new DiaboxPiece(id++, msgpanel);

            dp.size     = size;
            dp.filename = filename;
            dp.pos      = pos;
            dp.rect     = rect;
            return(dp);
        }
コード例 #5
0
        public DiaboxPiece SetDialogWindow(Vector2 size, Color color, Vector2 pos, Vector4 rect, float xint = 0, float yint = 0)
        {
            DiaboxPiece dp = new DiaboxPiece(id++, msgpanel);

            dp.size  = size;
            dp.color = color;
            //dp.color = new Color(color.r, color.g, color.b, opacity);
            dp.pos  = pos;
            dp.rect = rect;
            return(dp);
        }
コード例 #6
0
        /// <summary>
        /// 打开姓名输入框
        /// </summary>
        //public InputPiece SetName()
        //{
        //    return new InputPiece(id++, inputpanel);
        //}

        /// <summary>
        /// 章节名显示
        /// </summary>
        /// <param name="chapter">显示内容</param>
        //public ChapterNamePiece ShowChapter(string chapter="")
        //{
        //    return new ChapterNamePiece(id++, sidepanel ,chapter);
        //}

        /// <summary>
        /// 时间切换特效
        /// </summary>
        /// <param name="time">显示时间</param>
        /// <param name="place">显示文字</param>
        //public TimeSwitchPiece TimeSwitch(string time, string place)
        //{
        //    return new TimeSwitchPiece(id++, timepanel, time, place);
        //}

        /// <summary>
        /// 获得证据
        /// </summary>
        /// <param name="eviName">证据唯一ID</param>
        //public EviGetPiece GetEvidence(string eviName)
        //{
        //    return new EviGetPiece(id++, evipanel, eviName);
        //}

        /// <summary>
        ///  扣血
        /// </summary>
        /// <param name="x">血量,注意负数</param>
        //public HPPiece HPChange(int x)
        //{
        //    return new HPPiece(id++, hpui, x);
        //}

        public DiaboxPiece SetDialogWindow()
        {
            DiaboxPiece dp = new DiaboxPiece(id++, msgpanel);

            return(dp);
        }
コード例 #7
0
 public override void Update()
 {
     if (manager.isEffecting)
     {
         Debug.Log("Effects Running, Ignore Piece Update Event!");
         return;
     }
     if (pieces != null && current >= 0 && current < pieces.Count)
     {
         if (pieces[current].GetType() == typeof(EffectPiece))
         {
             //图像效果处理块
             manager.isEffecting = true;
             EffectPiece ep = (EffectPiece)pieces[current];
             ep.ExecAuto(new Action(() => {
                 manager.isEffecting = false; current = ep.Next(); Update();
             }));
         }
         else if (pieces[current].GetType() == typeof(SoundPiece))
         {
             //声音处理块
             manager.isEffecting = true;
             SoundPiece sp = (SoundPiece)pieces[current];
             sp.ExecAuto(new Action(() => { manager.isEffecting = false; current = sp.Next(); Update(); }));
         }
         else if (pieces[current].GetType() == typeof(ChapterNamePiece))
         {
             //章节名显示模块
             ChapterNamePiece cnp = (ChapterNamePiece)pieces[current];
             cnp.Exec();
             current = cnp.Next();
             Update();
         }
         //else if( pieces[current].GetType() == typeof(EviGetPiece))
         //{
         //    //证据显示处理块
         //    manager.BlockRightClick();
         //    EviGetPiece ev = (EviGetPiece)pieces[current];
         //    ev.Exec();
         //    if (ev.finished)
         //    {
         //        current = ev.Next();
         //        manager.UnblockRightClick();
         //        Update();
         //    }
         //}
         //else if (pieces[current].GetType() == typeof(HPPiece))
         //{
         //    //扣血模块
         //    manager.BlockRightClick();
         //    HPPiece hp = (HPPiece)pieces[current];
         //    hp.Exec();
         //    if (hp.finished)
         //    {
         //        current = hp.Next();
         //        manager.UnblockRightClick();
         //        Update();
         //    }
         //}
         else if (pieces[current].GetType() == typeof(DiaboxPiece))
         {
             //对话框控制模块
             manager.isEffecting = true;
             manager.BlockRightClick();
             DiaboxPiece dp = (DiaboxPiece)pieces[current];
             dp.ExecAuto(() => {
                 manager.isEffecting = false;
                 manager.UnblockRightClick();
                 current = dp.Next();
                 Update();
             });
         }
         //else if (pieces[current].GetType() == typeof(InputPiece))
         //{
         //    //姓名输入模块
         //    manager.isEffecting = true;
         //    manager.BlockRightClick();
         //    InputPiece ip = (InputPiece)pieces[current];
         //    ip.ExecAuto(new Action(() => { manager.isEffecting = false; manager.UnblockRightClick(); Update(); }));
         //    current = ip.Next();
         //}
         else if (pieces[current].GetType() == typeof(TimeSwitchPiece))
         {
             //地点转换模块
             manager.BlockRightClick();
             TimeSwitchPiece tsp = (TimeSwitchPiece)pieces[current];
             if (tsp.finished)
             {
                 tsp.ExecAuto(() => {
                     current = tsp.Next();
                     manager.UnblockRightClick();
                     Update();
                 });
             }
             else
             {
                 tsp.Exec();
             }
         }
         else
         {
             //文字块需等待点击
             TextPiece t = (TextPiece)pieces[current];
             if (t.finish)
             {
                 //t.Clear(); 交给textpiece内部处理
                 current = t.Next();
                 Update();
             }
             else
             {
                 //Debug.Log("文字块启用");
                 t.ExecAuto(() => { Update(); });
                 //t.Exec();
             }
         }
     }
     else
     {
         //Debug.Log(string.Format("Piece:{0}/{1}", current, pieces.Count()));
         end = true;
     }
 }