public Vector2 m_tt;     //枚举测试

    public override void LoadData(string key)
    {
        DataTable table = DataManager.GetData("item");

        if (!table.ContainsKey(key))
        {
            throw new Exception("itemGenerate LoadData Exception Not Fond key ->" + key + "<-");
        }

        SingleData data = table[key];

        m_asdasd = data.GetColor("asdasd");
        m_tt     = data.GetVector2("tt");
    }
Beispiel #2
0
    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");
    }
Beispiel #3
0
 static int GetVector2(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         SingleData          obj  = (SingleData)ToLua.CheckObject(L, 1, typeof(SingleData));
         string              arg0 = ToLua.CheckString(L, 2);
         UnityEngine.Vector2 o    = obj.GetVector2(arg0);
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }