public static DeclareRollDodge Create(int in_cd_time, int in_execute_time, int in_level, int in_max_dis, int in_super_armor_time) { DeclareRollDodge tmp = new DeclareRollDodge(); tmp._cd_time = in_cd_time; tmp._execute_time = in_execute_time; tmp._level = in_level; tmp._max_dis = in_max_dis; tmp._super_armor_time = in_super_armor_time; return(tmp); }
public static void Convert(Dictionary <int, DeclareRollDodge> data) { if (data == null) { return; } data.Clear(); data.Add(1, DeclareRollDodge.Create(5000, 400, 1, 700, 2000)); data.Add(2, DeclareRollDodge.Create(5000, 400, 2, 710, 2000)); data.Add(3, DeclareRollDodge.Create(5000, 400, 3, 720, 2000)); data.Add(4, DeclareRollDodge.Create(5000, 400, 4, 730, 2000)); data.Add(5, DeclareRollDodge.Create(5000, 400, 5, 740, 2000)); data.Add(6, DeclareRollDodge.Create(5000, 400, 6, 750, 2000)); data.Add(7, DeclareRollDodge.Create(5000, 400, 7, 760, 2000)); data.Add(8, DeclareRollDodge.Create(5000, 400, 8, 770, 2000)); data.Add(9, DeclareRollDodge.Create(5000, 400, 9, 780, 2000)); data.Add(10, DeclareRollDodge.Create(5000, 400, 10, 800, 2000)); }
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[]> >("DataRollDodge"); if (dic == null) { LuaEnv.SharedLuaEnv.DoString("DataRollDodge = require 'Lua/Config/DataRollDodge'"); dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataRollDodge"); } if (dic != null) { _dataCaches = new Dictionary <int, DeclareRollDodge>(10); foreach (var item in dic) { DeclareRollDodge tmp = new DeclareRollDodge(); tmp.CdTime = item.Value[0]; tmp.ExecuteTime = item.Value[1]; tmp.Level = item.Value[2]; tmp.MaxDis = item.Value[3]; tmp.SuperArmorTime = item.Value[4]; _dataCaches.Add(item.Key, tmp); } } Record(startTime, DateTime.Now.Ticks, "RollDodge"); } if (_dataCaches == null && _fillDataCallBack != null) { if (_dataCaches == null) { long startTime = DateTime.Now.Ticks; _dataCaches = new Dictionary <int, DeclareRollDodge>(10); _fillDataCallBack(_dataCaches); Record(startTime, DateTime.Now.Ticks, "RollDodge"); } } }