コード例 #1
0
    static int CreateUI(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                WCG.UIMgr obj            = (WCG.UIMgr)ToLua.CheckObject <WCG.UIMgr>(L, 1);
                string    arg0           = ToLua.CheckString(L, 2);
                UnityEngine.GameObject o = obj.CreateUI(arg0);
                ToLua.PushSealed(L, o);
                return(1);
            }
            else if (count == 3)
            {
                WCG.UIMgr obj  = (WCG.UIMgr)ToLua.CheckObject <WCG.UIMgr>(L, 1);
                string    arg0 = ToLua.CheckString(L, 2);
                UnityEngine.GameObject arg1 = (UnityEngine.GameObject)ToLua.CheckObject(L, 3, typeof(UnityEngine.GameObject));
                UnityEngine.GameObject o    = obj.CreateUI(arg0, arg1);
                ToLua.PushSealed(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: WCG.UIMgr.CreateUI"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }