void ReadSeasonData() { string text = ResourceLoadManager.Instance.GetConfigText(name2); if (text == null) { Debug.LogError("LoadConfig failed: " + name2); return; } XmlDocument xmlDoc = CommonFunction.LoadXmlConfig(name2, text); XmlNodeList nodelist = xmlDoc.SelectSingleNode("Data").ChildNodes; foreach (XmlElement xe in nodelist) { if (CommonFunction.IsCommented(xe)) { continue; } QualifyingNewSeason data = new QualifyingNewSeason(); data.season = uint.Parse(xe.SelectSingleNode("season").InnerText); data.start_time = xe.SelectSingleNode("start_time").InnerText; data.end_time = xe.SelectSingleNode("end_time").InnerText; seasons.Add(data.season, data); } }
public QualifyingNewSeason GetSeason(uint ID) { QualifyingNewSeason season = null; seasons.TryGetValue(ID, out season); return(season); }
static int GetSeason(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 2); QualifyingNewConfig obj = (QualifyingNewConfig)LuaScriptMgr.GetNetObjectSelf(L, 1, "QualifyingNewConfig"); uint arg0 = (uint)LuaScriptMgr.GetNumber(L, 2); fogs.proto.config.QualifyingNewSeasonConfig o = obj.GetSeason(arg0); LuaScriptMgr.PushObject(L, o); return(1); }
static int _Createfogs_proto_config_QualifyingNewSeasonConfig(IntPtr L) { int count = LuaDLL.lua_gettop(L); if (count == 0) { fogs.proto.config.QualifyingNewSeasonConfig obj = new fogs.proto.config.QualifyingNewSeasonConfig(); LuaScriptMgr.PushObject(L, obj); return(1); } else { LuaDLL.luaL_error(L, "invalid arguments to method: fogs.proto.config.QualifyingNewSeasonConfig.New"); } return(0); }
static int get_start_time(IntPtr L) { object o = LuaScriptMgr.GetLuaObject(L, 1); fogs.proto.config.QualifyingNewSeasonConfig obj = (fogs.proto.config.QualifyingNewSeasonConfig)o; if (obj == null) { LuaTypes types = LuaDLL.lua_type(L, 1); if (types == LuaTypes.LUA_TTABLE) { LuaDLL.luaL_error(L, "unknown member name start_time"); } else { LuaDLL.luaL_error(L, "attempt to index start_time on a nil value"); } } LuaScriptMgr.Push(L, obj.start_time); return(1); }
static int set_end_time(IntPtr L) { object o = LuaScriptMgr.GetLuaObject(L, 1); fogs.proto.config.QualifyingNewSeasonConfig obj = (fogs.proto.config.QualifyingNewSeasonConfig)o; if (obj == null) { LuaTypes types = LuaDLL.lua_type(L, 1); if (types == LuaTypes.LUA_TTABLE) { LuaDLL.luaL_error(L, "unknown member name end_time"); } else { LuaDLL.luaL_error(L, "attempt to index end_time on a nil value"); } } obj.end_time = LuaScriptMgr.GetString(L, 3); return(0); }