示例#1
0
        public static bool CreateWin(string name, bool byAction = false, EventMultiArgs actionArgs = null)
        {
            ControllerBase contro = GetControler(name);

            if (contro == null)
            {
                Utils.LogSys.LogError("CreateWin Error: ‘" + name + "’cannot find controller");
                return(false);
            }
            contro._createByActionArgs = actionArgs;
            autoResetAllRenderQueue();
            UILevel eLevel      = contro.ELevel;
            int     newWinDepth = GetNextDepth(eLevel);
            bool    res         = contro.CreateWin(newWinDepth, byAction);

            if (res)
            {
                RecordShowingWin(name, eLevel);
            }

#if UNITY_EDITOR
            Utils.LogSys.Log("CreateWin:" + name + ", depth=" + curDepth[eLevel].ToString());
#endif
            return(res);
        }
示例#2
0
 static public int CreateWin(IntPtr l)
 {
     try {
         UI.Controller.ControllerBase self = (UI.Controller.ControllerBase)checkSelf(l);
         System.Int32 a1;
         checkType(l, 2, out a1);
         System.Boolean a2;
         checkType(l, 3, out a2);
         var ret = self.CreateWin(a1, a2);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }