Ejemplo n.º 1
0
 static public void OnDestroy(UIFrame frame)
 {
     mOnDestroy.BeginPCall();
     mOnDestroy.Push(frame.UIID);
     mOnDestroy.Push(frame);
     mOnDestroy.PCall();
     mOnDestroy.EndPCall();
 }
Ejemplo n.º 2
0
 static public void OnDisable(UIFrame frame)
 {
     mOnDisable.BeginPCall();
     mOnDisable.Push(frame.UIID);
     mOnDisable.Push(frame);
     mOnDisable.PCall();
     mOnDisable.EndPCall();
 }
Ejemplo n.º 3
0
        static public void UnShowUI(int uiID)
        {
            UIFrame frame = null;

            if (mUIFrameDic.TryGetValue(uiID, out frame))
            {
                frame.OnUnShow();
            }
        }
Ejemplo n.º 4
0
        //下面两个方法调度UIFrame
        //UI关联的资源处理细节放到UIFrame里做
        static public void ShowUI(int uiID, string uiName)
        {
            Utils.Log("----------------------------ShowUI");
            UIFrame frame = null;

            if (!mUIFrameDic.TryGetValue(uiID, out frame))
            {
                frame             = new UIFrame(uiID, uiName);
                mUIFrameDic[uiID] = frame;
            }

            frame.OnShow();
        }
Ejemplo n.º 5
0
 static int OnUnShow(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         GameCore.UIFrame obj = (GameCore.UIFrame)ToLua.CheckObject <GameCore.UIFrame>(L, 1);
         obj.OnUnShow();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Ejemplo n.º 6
0
 static int OnDestroy(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         GameCore.UIFrame arg0 = (GameCore.UIFrame)ToLua.CheckObject <GameCore.UIFrame>(L, 1);
         GameCore.UIMgr.OnDestroy(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Ejemplo n.º 7
0
 static int Find(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         GameCore.UIFrame      obj  = (GameCore.UIFrame)ToLua.CheckObject <GameCore.UIFrame>(L, 1);
         string                arg0 = ToLua.CheckString(L, 2);
         UnityEngine.Transform o    = obj.Find(arg0);
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Ejemplo n.º 8
0
    static int get_UIID(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            GameCore.UIFrame obj = (GameCore.UIFrame)o;
            int ret = obj.UIID;
            LuaDLL.lua_pushinteger(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index UIID on a nil value"));
        }
    }
Ejemplo n.º 9
0
 static int DuplicateAndAdd(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 4);
         GameCore.UIFrame      obj  = (GameCore.UIFrame)ToLua.CheckObject <GameCore.UIFrame>(L, 1);
         UnityEngine.Transform arg0 = (UnityEngine.Transform)ToLua.CheckObject <UnityEngine.Transform>(L, 2);
         UnityEngine.Transform arg1 = (UnityEngine.Transform)ToLua.CheckObject <UnityEngine.Transform>(L, 3);
         int arg2 = (int)LuaDLL.luaL_checknumber(L, 4);
         UnityEngine.Transform o = obj.DuplicateAndAdd(arg0, arg1, arg2);
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Ejemplo n.º 10
0
    static int _CreateGameCore_UIFrame(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                int              arg0 = (int)LuaDLL.luaL_checknumber(L, 1);
                string           arg1 = ToLua.CheckString(L, 2);
                GameCore.UIFrame obj  = new GameCore.UIFrame(arg0, arg1);
                ToLua.PushObject(L, obj);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: GameCore.UIFrame.New"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }