public static DeclareBattleComboKill Create(int in_count, string in_title) { DeclareBattleComboKill tmp = new DeclareBattleComboKill(); tmp._count = in_count; tmp._title = in_title; return(tmp); }
public static void Convert(Dictionary <int, DeclareBattleComboKill> data) { if (data == null) { return; } data.Clear(); data.Add(1, DeclareBattleComboKill.Create(1, StringDefines.Key_13622)); data.Add(2, DeclareBattleComboKill.Create(2, StringDefines.Key_13623)); data.Add(10, DeclareBattleComboKill.Create(10, StringDefines.Key_13624)); data.Add(20, DeclareBattleComboKill.Create(20, StringDefines.Key_13625)); data.Add(30, DeclareBattleComboKill.Create(30, StringDefines.Key_13626)); data.Add(40, DeclareBattleComboKill.Create(40, StringDefines.Key_13627)); data.Add(50, DeclareBattleComboKill.Create(50, StringDefines.Key_13628)); }
public static void SetData() { if (_dataCaches == null && LuaEnv.isLoadLuaCfg) { long startTime = DateTime.Now.Ticks; Dictionary <int, int[]> dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataBattleComboKill"); if (dic == null) { LuaEnv.SharedLuaEnv.DoString("DataBattleComboKill = require 'Lua/Config/DataBattleComboKill'"); dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataBattleComboKill"); } if (dic != null) { _dataCaches = new Dictionary <int, DeclareBattleComboKill>(7); foreach (var item in dic) { DeclareBattleComboKill tmp = new DeclareBattleComboKill(); tmp.Count = item.Value[0]; tmp.Title = CfgStringLua.Get(item.Value[1]); _dataCaches.Add(item.Key, tmp); } } Record(startTime, DateTime.Now.Ticks, "BattleComboKill"); } if (_dataCaches == null && _fillDataCallBack != null) { if (_dataCaches == null) { long startTime = DateTime.Now.Ticks; _dataCaches = new Dictionary <int, DeclareBattleComboKill>(7); _fillDataCallBack(_dataCaches); Record(startTime, DateTime.Now.Ticks, "BattleComboKill"); } } }