#if USE_UNI_LUA
|
using LuaAPI = UniLua.Lua;
|
using RealStatePtr = UniLua.ILuaState;
|
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
#else
|
using LuaAPI = XLua.LuaDLL.Lua;
|
using RealStatePtr = System.IntPtr;
|
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
#endif
|
|
using XLua;
|
using System.Collections.Generic;
|
|
|
namespace XLua.CSObjectWrap
|
{
|
using Utils = XLua.Utils;
|
public class AssetVersionUtilityWrap
|
{
|
public static void __Register(RealStatePtr L)
|
{
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
System.Type type = typeof(AssetVersionUtility);
|
Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0);
|
|
|
|
|
|
|
Utils.EndObjectRegister(type, L, translator, null, null,
|
null, null, null);
|
|
Utils.BeginClassRegister(type, L, __CreateInstance, 9, 5, 2);
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "Init", _m_Init_xlua_st_);
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetAssetVersionFile", _m_GetAssetVersionFile_xlua_st_);
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "BeginDownLoadTask", _m_BeginDownLoadTask_xlua_st_);
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "UpdateAssetVersions", _m_UpdateAssetVersions_xlua_st_);
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetAssetVersion", _m_GetAssetVersion_xlua_st_);
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetAssetFilePath", _m_GetAssetFilePath_xlua_st_);
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetBuiltInAssetFilePath", _m_GetBuiltInAssetFilePath_xlua_st_);
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "IsUnpriorAssetDownLoadOk", _m_IsUnpriorAssetDownLoadOk_xlua_st_);
|
|
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "hasDownLoadFullAsset", _g_get_hasDownLoadFullAsset);
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "priorAssetDownLoadDone", _g_get_priorAssetDownLoadDone);
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "unPriorAssetDownLoadDone", _g_get_unPriorAssetDownLoadDone);
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "checkAssetCompleted", _g_get_checkAssetCompleted);
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "assetsBuildTime", _g_get_assetsBuildTime);
|
|
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "hasDownLoadFullAsset", _s_set_hasDownLoadFullAsset);
|
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "assetsBuildTime", _s_set_assetsBuildTime);
|
|
|
Utils.EndClassRegister(type, L, translator);
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int __CreateInstance(RealStatePtr L)
|
{
|
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
if(LuaAPI.lua_gettop(L) == 1)
|
{
|
|
AssetVersionUtility gen_ret = new AssetVersionUtility();
|
translator.Push(L, gen_ret);
|
|
return 1;
|
}
|
|
}
|
catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return LuaAPI.luaL_error(L, "invalid arguments to AssetVersionUtility constructor!");
|
|
}
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_Init_xlua_st_(RealStatePtr L)
|
{
|
try {
|
|
|
|
|
{
|
|
AssetVersionUtility.Init( );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_GetAssetVersionFile_xlua_st_(RealStatePtr L)
|
{
|
try {
|
|
|
|
|
{
|
|
AssetVersionUtility.GetAssetVersionFile( );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_BeginDownLoadTask_xlua_st_(RealStatePtr L)
|
{
|
try {
|
|
|
|
|
{
|
bool __prior = LuaAPI.lua_toboolean(L, 1);
|
|
AssetVersionUtility.BeginDownLoadTask( __prior );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_UpdateAssetVersions_xlua_st_(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
{
|
string __assetVersionFile = LuaAPI.lua_tostring(L, 1);
|
|
System.Collections.Generic.Dictionary<string, AssetVersion> gen_ret = AssetVersionUtility.UpdateAssetVersions( __assetVersionFile );
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_GetAssetVersion_xlua_st_(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
{
|
string __assetBundleName = LuaAPI.lua_tostring(L, 1);
|
|
AssetVersion gen_ret = AssetVersionUtility.GetAssetVersion( __assetBundleName );
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_GetAssetFilePath_xlua_st_(RealStatePtr L)
|
{
|
try {
|
|
|
|
|
{
|
string __assetKey = LuaAPI.lua_tostring(L, 1);
|
|
string gen_ret = AssetVersionUtility.GetAssetFilePath( __assetKey );
|
LuaAPI.lua_pushstring(L, gen_ret);
|
|
|
|
return 1;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_GetBuiltInAssetFilePath_xlua_st_(RealStatePtr L)
|
{
|
try {
|
|
|
|
|
{
|
string __assetKey = LuaAPI.lua_tostring(L, 1);
|
|
string gen_ret = AssetVersionUtility.GetBuiltInAssetFilePath( __assetKey );
|
LuaAPI.lua_pushstring(L, gen_ret);
|
|
|
|
return 1;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_IsUnpriorAssetDownLoadOk_xlua_st_(RealStatePtr L)
|
{
|
try {
|
|
|
|
|
{
|
|
bool gen_ret = AssetVersionUtility.IsUnpriorAssetDownLoadOk( );
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
|
|
return 1;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_hasDownLoadFullAsset(RealStatePtr L)
|
{
|
try {
|
|
LuaAPI.lua_pushboolean(L, AssetVersionUtility.hasDownLoadFullAsset);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_priorAssetDownLoadDone(RealStatePtr L)
|
{
|
try {
|
|
LuaAPI.lua_pushboolean(L, AssetVersionUtility.priorAssetDownLoadDone);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_unPriorAssetDownLoadDone(RealStatePtr L)
|
{
|
try {
|
|
LuaAPI.lua_pushboolean(L, AssetVersionUtility.unPriorAssetDownLoadDone);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_checkAssetCompleted(RealStatePtr L)
|
{
|
try {
|
|
LuaAPI.lua_pushboolean(L, AssetVersionUtility.checkAssetCompleted);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_assetsBuildTime(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
translator.Push(L, AssetVersionUtility.assetsBuildTime);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_hasDownLoadFullAsset(RealStatePtr L)
|
{
|
try {
|
|
AssetVersionUtility.hasDownLoadFullAsset = LuaAPI.lua_toboolean(L, 1);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_assetsBuildTime(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
System.DateTime gen_value;translator.Get(L, 1, out gen_value);
|
AssetVersionUtility.assetsBuildTime = gen_value;
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
|
|
|
|
}
|
}
|