Exemple #1
0
        public static void AddTask_NT(TaskList tl, bool topMode, Func <object, bool> tf, object tp = null, Action <object> tr = null)
        {
            if (tl == null)
            {
                throw new GameError();
            }

            if (tf == null)
            {
                throw new GameError();
            }

            TaskInfo ti = new TaskInfo();

            ti.Routine      = tf;
            ti.Param        = tp;
            ti.ReleaseParam = tr;

            if (topMode)
            {
                tl.AddTopTask(ti);
            }
            else
            {
                tl.AddTask(ti);
            }
        }
Exemple #2
0
        private static void DrawPic(int picId, LayoutInfo layout_bind)
        {
            ParamInfo i = new ParamInfo();

            i.PicId  = picId;
            i.Layout = layout_bind;
            i.Extra  = DPE;

            if (i.Extra.TL == null)
            {
                DrawPicFunc(i);
                DrawPicReleaseParam(i);
            }
            else
            {
                TaskList.AddTask(i.Extra.TL, false, DrawPicFunc, i, DrawPicReleaseParam);
            }
        }