static int HasDataTable(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityGameFramework.Runtime.DataTableComponent), typeof(System.Type)))
            {
                UnityGameFramework.Runtime.DataTableComponent obj = (UnityGameFramework.Runtime.DataTableComponent)ToLua.ToObject(L, 1);
                System.Type arg0 = (System.Type)ToLua.ToObject(L, 2);
                bool        o    = obj.HasDataTable(arg0);
                LuaDLL.lua_pushboolean(L, o);
                return(1);
            }
            else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityGameFramework.Runtime.DataTableComponent), typeof(System.Type), typeof(string)))
            {
                UnityGameFramework.Runtime.DataTableComponent obj = (UnityGameFramework.Runtime.DataTableComponent)ToLua.ToObject(L, 1);
                System.Type arg0 = (System.Type)ToLua.ToObject(L, 2);
                string      arg1 = ToLua.ToString(L, 3);
                bool        o    = obj.HasDataTable(arg0, arg1);
                LuaDLL.lua_pushboolean(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityGameFramework.Runtime.DataTableComponent.HasDataTable"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
    static int LoadDataTable(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(UnityGameFramework.Runtime.DataTableComponent), typeof(System.Type), typeof(string), typeof(string)))
            {
                UnityGameFramework.Runtime.DataTableComponent obj = (UnityGameFramework.Runtime.DataTableComponent)ToLua.ToObject(L, 1);
                System.Type arg0 = (System.Type)ToLua.ToObject(L, 2);
                string      arg1 = ToLua.ToString(L, 3);
                string      arg2 = ToLua.ToString(L, 4);
                obj.LoadDataTable(arg0, arg1, arg2);
                return(0);
            }
            else if (count == 5 && TypeChecker.CheckTypes(L, 1, typeof(UnityGameFramework.Runtime.DataTableComponent), typeof(System.Type), typeof(string), typeof(string), typeof(string)))
            {
                UnityGameFramework.Runtime.DataTableComponent obj = (UnityGameFramework.Runtime.DataTableComponent)ToLua.ToObject(L, 1);
                System.Type arg0 = (System.Type)ToLua.ToObject(L, 2);
                string      arg1 = ToLua.ToString(L, 3);
                string      arg2 = ToLua.ToString(L, 4);
                string      arg3 = ToLua.ToString(L, 5);
                obj.LoadDataTable(arg0, arg1, arg2, arg3);
                return(0);
            }
            else if (count == 5 && TypeChecker.CheckTypes(L, 1, typeof(UnityGameFramework.Runtime.DataTableComponent), typeof(System.Type), typeof(string), typeof(string), typeof(object)))
            {
                UnityGameFramework.Runtime.DataTableComponent obj = (UnityGameFramework.Runtime.DataTableComponent)ToLua.ToObject(L, 1);
                System.Type arg0 = (System.Type)ToLua.ToObject(L, 2);
                string      arg1 = ToLua.ToString(L, 3);
                string      arg2 = ToLua.ToString(L, 4);
                object      arg3 = ToLua.ToVarObject(L, 5);
                obj.LoadDataTable(arg0, arg1, arg2, arg3);
                return(0);
            }
            else if (count == 6 && TypeChecker.CheckTypes(L, 1, typeof(UnityGameFramework.Runtime.DataTableComponent), typeof(System.Type), typeof(string), typeof(string), typeof(string), typeof(object)))
            {
                UnityGameFramework.Runtime.DataTableComponent obj = (UnityGameFramework.Runtime.DataTableComponent)ToLua.ToObject(L, 1);
                System.Type arg0 = (System.Type)ToLua.ToObject(L, 2);
                string      arg1 = ToLua.ToString(L, 3);
                string      arg2 = ToLua.ToString(L, 4);
                string      arg3 = ToLua.ToString(L, 5);
                object      arg4 = ToLua.ToVarObject(L, 6);
                obj.LoadDataTable(arg0, arg1, arg2, arg3, arg4);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityGameFramework.Runtime.DataTableComponent.LoadDataTable"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
 static int GetAllDataTables(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         UnityGameFramework.Runtime.DataTableComponent obj = (UnityGameFramework.Runtime.DataTableComponent)ToLua.CheckObject(L, 1, typeof(UnityGameFramework.Runtime.DataTableComponent));
         GameFramework.DataTable.DataTableBase[]       o   = obj.GetAllDataTables();
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
        private void Start()
        {
            m_DataTableComponent = GameEntry.GetComponent <DataTableComponent>();
            if (m_DataTableComponent == null)
            {
                Log.Fatal("Data table component is invalid.");
                return;
            }

            m_ResourceComponent = GameEntry.GetComponent <ResourceComponent>();
            if (m_ResourceComponent == null)
            {
                Log.Fatal("Resource component is invalid.");
                return;
            }
        }
    static int get_Count(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityGameFramework.Runtime.DataTableComponent obj = (UnityGameFramework.Runtime.DataTableComponent)o;
            int ret = obj.Count;
            LuaDLL.lua_pushinteger(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Count on a nil value" : e.Message));
        }
    }
Esempio n. 6
0
 private void Start()
 {
     m_DataTableComponent = GameEntry.GetComponent <DataTableComponent>();
 }