public override void LoadData(string key) { DataTable table = DataManager.GetData("testData"); if (!table.ContainsKey(key)) { throw new Exception("testDataGenerate LoadData Exception Not Fond key ->" + key + "<-"); } SingleData data = table[key]; m_name = data.GetVector2("name"); m_pos = data.GetVector3("pos"); m_age = data.GetInt("age"); }
static int GetVector3(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); SingleData obj = (SingleData)ToLua.CheckObject(L, 1, typeof(SingleData)); string arg0 = ToLua.CheckString(L, 2); UnityEngine.Vector3 o = obj.GetVector3(arg0); ToLua.Push(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public Vector3 m_GhostColor; //残影颜色 public override void LoadData(string key) { DataTable table = DataManager.GetData("ShiftData"); if (!table.ContainsKey(key)) { throw new Exception("ShiftDataGenerate LoadData Exception Not Fond key ->" + key + "<-"); } SingleData data = table[key]; m_key = key; m_Direction = data.GetEnum <DirectionEnum>("Direction"); m_Distance = data.GetFloat("Distance"); m_Height = data.GetFloat("Height"); m_Time = data.GetFloat("Time"); m_GhostColor = data.GetVector3("GhostColor"); }
Vector3 GetTipContentPos(SingleData data) { return(data.GetVector3(c_TipContentPosKey)); }