Esempio n. 1
0
    static int GetInfoByName(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        XMLLoader <XMLDataTimes> obj = LuaScriptMgr.GetNetObject <XMLLoader <XMLDataTimes> >(L, 1);
        string       arg0            = LuaScriptMgr.GetLuaString(L, 2);
        XMLDataTimes o = obj.GetInfoByName(arg0);

        LuaScriptMgr.PushObject(L, o);
        return(1);
    }
Esempio n. 2
0
    static int GetInfoById(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        XMLLoader <XMLDataTimes> obj = LuaScriptMgr.GetNetObject <XMLLoader <XMLDataTimes> >(L, 1);
        int          arg0            = (int)LuaScriptMgr.GetNumber(L, 2);
        XMLDataTimes o = obj.GetInfoById(arg0);

        LuaScriptMgr.PushObject(L, o);
        return(1);
    }
Esempio n. 3
0
    /// <summary>
    /// 初始化历史时期列表
    /// </summary>
    private void InitTimesList()
    {
        m_listTimes = new List <string>();

        IEnumerator enumerator = XMLManager.Times.Data.Values.GetEnumerator();

        while (enumerator.MoveNext())
        {
            XMLDataTimes info = (XMLDataTimes)enumerator.Current;
            m_listTimes.Add(info.Name);
        }
    }
Esempio n. 4
0
    static int set_ID(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        if (o == null)
        {
            LuaDLL.luaL_error(L, "unknown member name ID");
        }

        XMLDataTimes obj = (XMLDataTimes)o;

        obj.ID = (int)LuaScriptMgr.GetNumber(L, 3);
        return(0);
    }
Esempio n. 5
0
    static int get_Year(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        if (o == null)
        {
            LuaDLL.luaL_error(L, "unknown member name Year");
        }

        XMLDataTimes obj = (XMLDataTimes)o;

        LuaScriptMgr.Push(L, obj.Year);
        return(1);
    }
Esempio n. 6
0
    static int set_Name(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        if (o == null)
        {
            LuaDLL.luaL_error(L, "unknown member name Name");
        }

        XMLDataTimes obj = (XMLDataTimes)o;

        obj.Name = LuaScriptMgr.GetString(L, 3);
        return(0);
    }