This commit is contained in:
chenxi 2023-06-16 15:11:05 +08:00
parent f3b3a3f117
commit e3d7fad227
6 changed files with 800 additions and 408 deletions

View File

@ -18,6 +18,7 @@ namespace BF
public string cdn_url; public string cdn_url;
public List<Dictionary<string, string>> game_urls = new List<Dictionary<string, string>>(); public List<Dictionary<string, string>> game_urls = new List<Dictionary<string, string>>();
public long open_at; public long open_at;
public long now;
public string notice; public string notice;
} }
} }

View File

@ -21,7 +21,7 @@ namespace XLua.CSObjectWrap
{ {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
System.Type type = typeof(BF.BFVersionInfo); System.Type type = typeof(BF.BFVersionInfo);
Utils.BeginObjectRegister(type, L, translator, 0, 0, 9, 9); Utils.BeginObjectRegister(type, L, translator, 0, 0, 10, 10);
@ -33,6 +33,7 @@ namespace XLua.CSObjectWrap
Utils.RegisterFunc(L, Utils.GETTER_IDX, "cdn_url", _g_get_cdn_url); Utils.RegisterFunc(L, Utils.GETTER_IDX, "cdn_url", _g_get_cdn_url);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "game_urls", _g_get_game_urls); Utils.RegisterFunc(L, Utils.GETTER_IDX, "game_urls", _g_get_game_urls);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "open_at", _g_get_open_at); Utils.RegisterFunc(L, Utils.GETTER_IDX, "open_at", _g_get_open_at);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "now", _g_get_now);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "notice", _g_get_notice); Utils.RegisterFunc(L, Utils.GETTER_IDX, "notice", _g_get_notice);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "min_version", _s_set_min_version); Utils.RegisterFunc(L, Utils.SETTER_IDX, "min_version", _s_set_min_version);
@ -43,6 +44,7 @@ namespace XLua.CSObjectWrap
Utils.RegisterFunc(L, Utils.SETTER_IDX, "cdn_url", _s_set_cdn_url); Utils.RegisterFunc(L, Utils.SETTER_IDX, "cdn_url", _s_set_cdn_url);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "game_urls", _s_set_game_urls); Utils.RegisterFunc(L, Utils.SETTER_IDX, "game_urls", _s_set_game_urls);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "open_at", _s_set_open_at); Utils.RegisterFunc(L, Utils.SETTER_IDX, "open_at", _s_set_open_at);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "now", _s_set_now);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "notice", _s_set_notice); Utils.RegisterFunc(L, Utils.SETTER_IDX, "notice", _s_set_notice);
@ -204,6 +206,20 @@ namespace XLua.CSObjectWrap
return 1; return 1;
} }
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_now(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.BFVersionInfo gen_to_be_invoked = (BF.BFVersionInfo)translator.FastGetCSObj(L, 1);
LuaAPI.lua_pushint64(L, gen_to_be_invoked.now);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_notice(RealStatePtr L) static int _g_get_notice(RealStatePtr L)
{ {
@ -340,6 +356,21 @@ namespace XLua.CSObjectWrap
return 0; return 0;
} }
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_now(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.BFVersionInfo gen_to_be_invoked = (BF.BFVersionInfo)translator.FastGetCSObj(L, 1);
gen_to_be_invoked.now = LuaAPI.lua_toint64(L, 2);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_notice(RealStatePtr L) static int _s_set_notice(RealStatePtr L)
{ {

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

@ -0,0 +1,132 @@
fileFormatVersion: 2
guid: 8dd764c8debefd340829134cbd0d1617
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 47
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 50
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 12
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 586 B

After

Width:  |  Height:  |  Size: 581 B