public static void Convert(Dictionary <int, DeclareJump> data) { if (data == null) { return; } data.Clear(); data.Add(1, DeclareJump.Create(StringDefines.Key_42278, 0, 0, 0, 0, 400, 1, StringDefines.Key_20, 800, 1300)); data.Add(2, DeclareJump.Create(StringDefines.Key_42279, 400, 500, 300, 1, 500, 2, StringDefines.Key_42280, 600, 600)); data.Add(3, DeclareJump.Create(StringDefines.Key_42281, 400, 600, 300, 1, 100, 3, StringDefines.Key_42282, 1800, 1000)); }
public static DeclareJump Create(string in_aniID, int in_endAddSpeed, int in_endMaxDis, int in_endSpeed, int in_haveEnd, int in_maxHeight, int in_stage, string in_startCurve, int in_startMaxDis, int in_startTime) { DeclareJump tmp = new DeclareJump(); tmp._aniID = in_aniID; tmp._endAddSpeed = in_endAddSpeed; tmp._endMaxDis = in_endMaxDis; tmp._endSpeed = in_endSpeed; tmp._haveEnd = in_haveEnd; tmp._maxHeight = in_maxHeight; tmp._stage = in_stage; tmp._startCurve = in_startCurve; tmp._startMaxDis = in_startMaxDis; tmp._startTime = in_startTime; return(tmp); }
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[]> >("DataJump"); if (dic == null) { LuaEnv.SharedLuaEnv.DoString("DataJump = require 'Lua/Config/DataJump'"); dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataJump"); } if (dic != null) { _dataCaches = new Dictionary <int, DeclareJump>(3); foreach (var item in dic) { DeclareJump tmp = new DeclareJump(); tmp.AniID = CfgStringLua.Get(item.Value[0]); tmp.EndAddSpeed = item.Value[1]; tmp.EndMaxDis = item.Value[2]; tmp.EndSpeed = item.Value[3]; tmp.HaveEnd = item.Value[4]; tmp.MaxHeight = item.Value[5]; tmp.Stage = item.Value[6]; tmp.StartCurve = CfgStringLua.Get(item.Value[7]); tmp.StartMaxDis = item.Value[8]; tmp.StartTime = item.Value[9]; _dataCaches.Add(item.Key, tmp); } } Record(startTime, DateTime.Now.Ticks, "Jump"); } if (_dataCaches == null && _fillDataCallBack != null) { if (_dataCaches == null) { long startTime = DateTime.Now.Ticks; _dataCaches = new Dictionary <int, DeclareJump>(3); _fillDataCallBack(_dataCaches); Record(startTime, DateTime.Now.Ticks, "Jump"); } } }