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");
    }
Exemplo n.º 2
0
 static int GetColor(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         SingleData        obj  = (SingleData)ToLua.CheckObject(L, 1, typeof(SingleData));
         string            arg0 = ToLua.CheckString(L, 2);
         UnityEngine.Color o    = obj.GetColor(arg0);
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }