Merge branch 'master_develop' of http://60.1.1.230/gaoxin/JL_Client into master_develop
commit
b209b5ae28
|
|
@ -17,6 +17,7 @@ namespace SDK
|
|||
public virtual string GetPayOrderID() { return ""; }
|
||||
public virtual void CustomEvent(string eventName, string eventDesc) { }
|
||||
public virtual void ShotCapture() { }
|
||||
public virtual void ClearFileCache() { }
|
||||
private Queue<Message> messages = new Queue<Message>();
|
||||
public void PushMessage(Message msg) { lock (messages) { messages.Enqueue(msg); } }
|
||||
public Message PopMessage() { lock (messages) { return messages.Count > 0 ? messages.Dequeue() : null; } }
|
||||
|
|
|
|||
|
|
@ -139,5 +139,9 @@ namespace SDK
|
|||
{
|
||||
currentActivity.Call("Logout");
|
||||
}
|
||||
|
||||
public override void ClearFileCache() {
|
||||
currentActivity.Call("ClearFileCache");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -152,6 +152,16 @@ namespace SDK
|
|||
{
|
||||
proxy.Exit();
|
||||
}
|
||||
|
||||
// 清除安卓缓存文件
|
||||
public void ClearFileCacheAndroid()
|
||||
{
|
||||
if (Application.platform == RuntimePlatform.Android)
|
||||
{
|
||||
proxy.ClearFileCache();
|
||||
}
|
||||
}
|
||||
|
||||
//sdk获取支付订单号
|
||||
public string GetPayOrderID()
|
||||
{
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 116 KiB |
|
|
@ -0,0 +1,110 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3c11915fc865900408ce6beb332dbbd4
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 9
|
||||
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
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 2
|
||||
aniso: -1
|
||||
mipBias: -100
|
||||
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
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 2
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 65
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 58
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 4
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: a5159384e102d4c408c494178eb893a2
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 704 KiB |
|
|
@ -0,0 +1,110 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d425d2aa389cdb046911ac2ea4f52b94
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 9
|
||||
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
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 2
|
||||
aniso: -1
|
||||
mipBias: -100
|
||||
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
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 2
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 65
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 58
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 4
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 0d829add80de1ba43be1044b93570fdb
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -2045,6 +2045,7 @@ BATTLE_TYPE = {
|
|||
Senro = 12, -- 森罗幻境
|
||||
Xuanyuan = 13, -- 轩辕宝镜
|
||||
GuildTranscript = 14, -- 公会副本
|
||||
ARENA = 15, -- 竞技场
|
||||
}
|
||||
rankKingList={ [1] = { bgImage = "r_zjm_paihangbang_banner04", name = Language[12164] ,rankType = RANK_TYPE.FIGHT_LEVEL_RANK,activiteId = 0,isRankingMainPanelShow = true},
|
||||
[2] = { bgImage = "r_zjm_paihangbang_banner02", name = Language[12165] ,rankType = RANK_TYPE.FORCE_CURR_RANK,activiteId = 0,isRankingMainPanelShow = true},
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ end
|
|||
--- doneFunc 战斗播放完成要回调的事件
|
||||
function this.RequestReplayRecord(isWin, fightData, nameStr, doneFunc)
|
||||
local fightData = BattleManager.GetBattleServerData({fightData = fightData}, 1)
|
||||
local battlePanel = UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.BACK, doneFunc)
|
||||
local battlePanel = UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.ARENA, doneFunc)
|
||||
battlePanel:ShowNameShow(isWin, nameStr)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -675,7 +675,7 @@ function this.GetBattleBg(fightType)
|
|||
if fightType == BATTLE_TYPE.STORY_FIGHT then
|
||||
local curChapter = FightPointPassManager.GetCurChapterIndex()
|
||||
index = math.floor((curChapter - 1) % 5 + 1)
|
||||
elseif fightType == BATTLE_TYPE.BACK then
|
||||
elseif fightType == BATTLE_TYPE.BACK or fightType == BATTLE_TYPE.ARENA then
|
||||
index = 1001
|
||||
elseif fightType == BATTLE_TYPE.EXECUTE_FIGHT then
|
||||
index = 1002
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ function this:BindEvent()
|
|||
local pauseTime = 31
|
||||
Util.AddClick(this.BtnExit, function ()
|
||||
if not BattleManager.IsUnlockBattlePass() then
|
||||
PopupTipPanel.ShowTip(PrivilegeManager.GetPrivilegeOpenTip(isBack and PRIVILEGE_TYPE.SkipFight or PRIVILEGE_TYPE.ExitFight ))
|
||||
PopupTipPanel.ShowTip(PrivilegeManager.GetPrivilegeOpenTip(PRIVILEGE_TYPE.SkipFight))
|
||||
return
|
||||
end
|
||||
if BattleLogic.IsEnd or not BattleManager.IsCanOperate() then
|
||||
|
|
@ -377,7 +377,7 @@ function this.ShowBattleResult(result, msg)
|
|||
UIManager.ClosePanel(UIName.ElementPopup)
|
||||
end
|
||||
-- 回放直接关闭界面
|
||||
if fightType == BATTLE_TYPE.BACK then
|
||||
if fightType == BATTLE_TYPE.BACK or fightType == BATTLE_TYPE.ARENA then
|
||||
this:ClosePanel()
|
||||
return
|
||||
end
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ local expertRewardTabs = {}
|
|||
local activeIndext = 0
|
||||
local titleImageSprites = {[10]="x_xianshihuodong_jishudarenbanner",[11]="r_daren_jingji",[9]="r_daren_banner_01",[12]="r_daren_zhuangbei",[13]="x_xianshihuodong_dianjindarenbanner",--"r_daren_dianjing",
|
||||
[14]="r_daren_fuben",[15]="r_daren_fuben",[16]="r_daren_fabao_01",[17]="r_daren_hunyin_01",[7]="r_huodong_leiji",
|
||||
[19]="r_daren_xubao",[20]="r_daren_tanbao",[21]="r_daren_zhengmu",[22]="r_daren_mibao"}
|
||||
[19]="r_daren_xubao3",[20]="r_daren_tanbao",[21]="r_daren_zhengmu",[22]="r_daren_mibao"}
|
||||
function Expert:ctor(mainPanel, gameObject)
|
||||
self.mainPanel = mainPanel
|
||||
self.gameObject = gameObject
|
||||
|
|
@ -23,6 +23,7 @@ function Expert:InitComponent(gameObject)
|
|||
this.timeTextExpert = Util.GetGameObject(gameObject, "timeText"):GetComponent("Text")
|
||||
this.titleImageExpert1 = Util.GetGameObject(gameObject, "Image")
|
||||
this.titleImageExpert2 = Util.GetGameObject(gameObject, "Image2")
|
||||
this.xunbaoTextImage = Util.GetGameObject(gameObject, "xunbaoTextImage")
|
||||
this.titleTextExpert = Util.GetGameObject(gameObject, "Image/Text")
|
||||
this.titleTextExpert2 = Util.GetGameObject(gameObject, "Image2/Text")
|
||||
this.titleTextExpert2Go = Util.GetGameObject(gameObject, "Image2")
|
||||
|
|
@ -115,6 +116,7 @@ function Expert:OnShowData(index)
|
|||
this.titleTextExpert:SetActive(false)
|
||||
this.titleImageExpert1:SetActive(false)
|
||||
this.titleImageExpert2:SetActive(false)
|
||||
this.xunbaoTextImage:SetActive(false)
|
||||
local conFigData = ConfigManager.GetConfigData(ConfigName.GlobalActivity,ActivityGiftManager.GetOpenExpertIdByActivityType(numExChange[index]))
|
||||
if conFigData then
|
||||
local ExpertDec = string.split(conFigData.ExpertDec, "#")
|
||||
|
|
@ -124,7 +126,11 @@ function Expert:OnShowData(index)
|
|||
this.titleTextExpert2Go:SetActive(true)
|
||||
this.titleTextExpert2:GetComponent("Text").text = ExpertDec[1]
|
||||
elseif numExChange[activeIndext] == ActivityTypeDef.GoldExper then
|
||||
|
||||
elseif numExChange[activeIndext] == ActivityTypeDef.FindTreasureExper then
|
||||
this.xunbaoTextImage:SetActive(true)
|
||||
this.titleImageExpert1:SetActive(true)
|
||||
this.titleTextExpert:SetActive(true)
|
||||
this.titleTextExpert:GetComponent("Text").text = ExpertDec[1]
|
||||
else
|
||||
this.titleImageExpert1:SetActive(true)
|
||||
this.titleTextExpert:SetActive(true)
|
||||
|
|
|
|||
|
|
@ -83,9 +83,9 @@ function this.InitMsg(msg)
|
|||
this.serData[id].endTime = endTime
|
||||
this.serData[id].restTime = restTime
|
||||
|
||||
--Log(
|
||||
-- string.format("--- 功能解锁数据 id = %s, startTime = %s, endTime = %s",
|
||||
-- id, startTime, endTime))
|
||||
LogRed(
|
||||
string.format("--- 功能解锁数据 id = %s, startTime = %s, endTime = %s",
|
||||
id, startTime, endTime))
|
||||
|
||||
-- 用于标记是否解锁使用
|
||||
local typeId = AllActSetConfig[id].IsIDdSame
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ function this:InitComponent()
|
|||
|
||||
|
||||
self.handPoint = Util.GetGameObject(self.buttonIcon,"GameObject")
|
||||
poolManager:LoadLive("live2d_c_yff_0048", self.dialogRoot.transform, Vector3.one * 0.36, Vector3.New(-330, 100))
|
||||
poolManager:LoadLive("live2d_c_gyps_00020", self.dialogRoot.transform, Vector3.one * 0.46, Vector3.New(-350, 210))
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
|
|
@ -140,7 +140,7 @@ function this.ExecuteBehavior(beType, beArgs)
|
|||
if curGuideId == curId then
|
||||
this.NextGuide()
|
||||
end
|
||||
end)
|
||||
end)
|
||||
this.button:GetComponent("Button").onClick:RemoveAllListeners()
|
||||
Util.AddClick(this.button, this.NextGuide)
|
||||
end)
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ using UnityEngine;
|
|||
using UnityEngine.Events;
|
||||
using LuaInterface;
|
||||
using GameCore;
|
||||
using System.IO;
|
||||
|
||||
namespace GameLogic {
|
||||
/// <summary>
|
||||
/// 资源管理器
|
||||
|
|
@ -134,6 +136,15 @@ namespace GameLogic {
|
|||
{
|
||||
}
|
||||
|
||||
}
|
||||
#region 更新apk后,清空缓存文件
|
||||
public void ClearFilesCache()
|
||||
{
|
||||
if (Directory.Exists(Application.persistentDataPath))
|
||||
Directory.Delete(Application.persistentDataPath, true);
|
||||
Directory.CreateDirectory(Application.persistentDataPath);
|
||||
|
||||
SDK.SDKManager.Instance.ClearFileCacheAndroid();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ namespace GameLogic
|
|||
public void Initialize()
|
||||
{
|
||||
InitVersions();
|
||||
CheckApkVersionInfo();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -120,53 +121,72 @@ namespace GameLogic
|
|||
/// 2.拿不到返回-1
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string GetLocalVersion()
|
||||
public string GetLocalVersion()
|
||||
{
|
||||
if (externalVersion != null)
|
||||
{
|
||||
return externalVersion.GetInfo("version");
|
||||
}
|
||||
string extVersion = externalVersion != null ? externalVersion.GetInfo("version") : "";
|
||||
string intVersion = internalVersion != null ? externalVersion.GetInfo("version") : "";
|
||||
|
||||
if (internalVersion != null)
|
||||
int aV, rV;
|
||||
string[] extVersions = extVersion.Split('.');
|
||||
if (extVersion.Length != intVersion.Length || !int.TryParse(extVersions[1], out aV) || !int.TryParse(extVersions[2], out rV))
|
||||
{
|
||||
return internalVersion.GetInfo("version");
|
||||
Debug.Log("VersionManager GetLocalVersion version: " + intVersion);
|
||||
return intVersion;
|
||||
}
|
||||
return null;
|
||||
Debug.Log("VersionManager GetLocalVersion version: " + extVersion);
|
||||
return extVersion;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检测是否apk信息
|
||||
/// </summary>
|
||||
private void CheckApkVersionInfo()
|
||||
{
|
||||
string inteVer = internalVersion != null ? externalVersion.GetInfo("version") : "";
|
||||
string extVer = externalVersion != null ? externalVersion.GetInfo("version") : "";
|
||||
|
||||
ResourcesUpdateState state = VersionManager.VersionCompare(inteVer, extVer);
|
||||
if (state == ResourcesUpdateState.OldPackageNeedChange)
|
||||
{
|
||||
ResourcesManager.Instance.ClearFilesCache();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 对比版本号,返回不一样的位数 -1表示对比异常,0表示相同,其余表示按位不同
|
||||
/// </summary>
|
||||
/// <param name="ver1"></param>
|
||||
/// <param name="ver2"></param>
|
||||
/// <param name="ver1"> serverversion </param>
|
||||
/// <param name="ver2"> localversion </param>
|
||||
/// <returns></returns>
|
||||
public static int VersionCompare(string ver1, string ver2)
|
||||
public static ResourcesUpdateState VersionCompare(string ver1, string ver2)
|
||||
{
|
||||
string[] vs1 = ver1.Split('.');
|
||||
string[] vs2 = ver2.Split('.');
|
||||
|
||||
if(vs1.Length != vs2.Length)
|
||||
if (vs1.Length != vs2.Length || vs1.Length < 3 || vs2.Length < 3)
|
||||
{
|
||||
return -1;
|
||||
Debug.LogError("VersionManager VersionCompare vs1.Length != vs2.Length! vs1 count: " + vs1.Length + " vs2 count: " + vs2.Length);
|
||||
return ResourcesUpdateState.Err;
|
||||
}
|
||||
|
||||
int v1, v2;
|
||||
for (int i = 0; i < vs1.Length; i++)
|
||||
// 对比大版本
|
||||
if (!int.TryParse(vs1[1], out v1) || !int.TryParse(vs2[1], out v2))
|
||||
{
|
||||
if (!int.TryParse(vs1[i], out v1))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if (!int.TryParse(vs2[i], out v2))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if (v1 != v2)
|
||||
{
|
||||
return i + 1;
|
||||
}
|
||||
Debug.LogError(string.Format("VersionManager VersionCompare vs1:{0} or vs2: {1} pos 1 Conver to int err!!", vs1, vs2));
|
||||
return ResourcesUpdateState.Err;
|
||||
}
|
||||
return 0;
|
||||
if (v1 != v2) return ResourcesUpdateState.OldPackageNeedChange;
|
||||
|
||||
// 对比小版本
|
||||
if (!int.TryParse(vs1[2], out v1) || !int.TryParse(vs2[2], out v2))
|
||||
{
|
||||
Debug.LogError(string.Format("VersionManager VersionCompare vs1:{0} or vs2: {1} pos 2 Conver to int err!!", vs1, vs2));
|
||||
return ResourcesUpdateState.Err;
|
||||
}
|
||||
if (v1 != v2) return ResourcesUpdateState.PackageNeedRes;
|
||||
|
||||
return ResourcesUpdateState.Normal;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -208,21 +228,5 @@ namespace GameLogic
|
|||
return AppConst.PersistentDataPath + VersionsFile + ".txt";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检测包版本,用于比较本地包与线上包的差异,有差异则需要更换新包
|
||||
/// </summary>
|
||||
public static bool CheckPackageVersionSame(string checkVersion)
|
||||
{
|
||||
string localPackageVersion = Instance.GetVersionInfo("packageVersion");
|
||||
if(localPackageVersion != null && checkVersion != null)
|
||||
{
|
||||
return localPackageVersion.Equals(checkVersion);
|
||||
}else if(localPackageVersion == null && checkVersion == null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -141,6 +141,12 @@ namespace ResUpdate
|
|||
Success,
|
||||
//需要更换新包
|
||||
OldPackageNeedChange,
|
||||
//需要下载热更资源
|
||||
PackageNeedRes,
|
||||
// 包体正常(不需要进行大小版本更新)
|
||||
Normal,
|
||||
// 错误
|
||||
Err,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -336,31 +342,27 @@ namespace ResUpdate
|
|||
}
|
||||
else
|
||||
{
|
||||
string packageVersion = table["packageVersion"] as string;
|
||||
if (VersionManager.CheckPackageVersionSame(packageVersion))
|
||||
{
|
||||
string version = table["version"] as string;
|
||||
int result = VersionManager.VersionCompare(version, localVersion);
|
||||
//下载链接
|
||||
Debug.Log(string.Format("ResUpdate=====>InitDownLoadURL,Version:{0},loadVersion:{1}", version, localVersion));
|
||||
Debug.Log(string.Format("Version Compare result:{0}", result));
|
||||
//如果版本号一致,就不进行更新了
|
||||
if (result == 0)
|
||||
{
|
||||
Debug.Log(string.Format("version:{0},版本号一致,更新完成", version));
|
||||
UpdateSuccess();
|
||||
}
|
||||
else
|
||||
{
|
||||
localVersion = version;
|
||||
DownLoadVersionFiles();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SetResourcesUpdateState(true, ResourcesUpdateState.OldPackageNeedChange);
|
||||
}
|
||||
string version = table["version"] as string;
|
||||
ResourcesUpdateState result = VersionManager.VersionCompare(version,localVersion);
|
||||
Debug.Log(string.Format("ResouresUpdateManager GetGameVersion localVersion:{0} serverVersion:{1} result:{2}",localVersion, version, (int)result));
|
||||
this.localVersion = version;
|
||||
|
||||
switch (result)
|
||||
{
|
||||
case ResourcesUpdateState.Normal:
|
||||
UpdateSuccess();
|
||||
break;
|
||||
case ResourcesUpdateState.PackageNeedRes:
|
||||
DownLoadVersionFiles();
|
||||
break;
|
||||
case ResourcesUpdateState.OldPackageNeedChange:
|
||||
ResourcesManager.Instance.ClearFilesCache();
|
||||
SetResourcesUpdateState(true, ResourcesUpdateState.OldPackageNeedChange);
|
||||
break;
|
||||
default:
|
||||
UpdateSuccess();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -574,7 +576,7 @@ namespace ResUpdate
|
|||
/// <param name="state">更新状态</param>
|
||||
/// <param name="param">参数</param>
|
||||
void SetResourcesUpdateState(bool isFinish, ResourcesUpdateState state, object param = null)
|
||||
{
|
||||
{
|
||||
ThreadManager.Instance.QueueOnMainThread(() => {
|
||||
if (resourcsUpdateAction != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ public class DelegateFactory
|
|||
dict.Add(typeof(UnityEngine.Application.AdvertisingIdentifierCallback), factory.UnityEngine_Application_AdvertisingIdentifierCallback);
|
||||
dict.Add(typeof(UnityEngine.Application.LowMemoryCallback), factory.UnityEngine_Application_LowMemoryCallback);
|
||||
dict.Add(typeof(UnityEngine.Application.LogCallback), factory.UnityEngine_Application_LogCallback);
|
||||
dict.Add(typeof(System.Action<bool>), factory.System_Action_bool);
|
||||
dict.Add(typeof(System.Func<bool>), factory.System_Func_bool);
|
||||
dict.Add(typeof(UnityEngine.AudioClip.PCMReaderCallback), factory.UnityEngine_AudioClip_PCMReaderCallback);
|
||||
dict.Add(typeof(UnityEngine.AudioClip.PCMSetPositionCallback), factory.UnityEngine_AudioClip_PCMSetPositionCallback);
|
||||
|
|
@ -153,6 +154,7 @@ public class DelegateFactory
|
|||
DelegateTraits<UnityEngine.Application.AdvertisingIdentifierCallback>.Init(factory.UnityEngine_Application_AdvertisingIdentifierCallback);
|
||||
DelegateTraits<UnityEngine.Application.LowMemoryCallback>.Init(factory.UnityEngine_Application_LowMemoryCallback);
|
||||
DelegateTraits<UnityEngine.Application.LogCallback>.Init(factory.UnityEngine_Application_LogCallback);
|
||||
DelegateTraits<System.Action<bool>>.Init(factory.System_Action_bool);
|
||||
DelegateTraits<System.Func<bool>>.Init(factory.System_Func_bool);
|
||||
DelegateTraits<UnityEngine.AudioClip.PCMReaderCallback>.Init(factory.UnityEngine_AudioClip_PCMReaderCallback);
|
||||
DelegateTraits<UnityEngine.AudioClip.PCMSetPositionCallback>.Init(factory.UnityEngine_AudioClip_PCMSetPositionCallback);
|
||||
|
|
@ -235,6 +237,7 @@ public class DelegateFactory
|
|||
TypeTraits<UnityEngine.Application.AdvertisingIdentifierCallback>.Init(factory.Check_UnityEngine_Application_AdvertisingIdentifierCallback);
|
||||
TypeTraits<UnityEngine.Application.LowMemoryCallback>.Init(factory.Check_UnityEngine_Application_LowMemoryCallback);
|
||||
TypeTraits<UnityEngine.Application.LogCallback>.Init(factory.Check_UnityEngine_Application_LogCallback);
|
||||
TypeTraits<System.Action<bool>>.Init(factory.Check_System_Action_bool);
|
||||
TypeTraits<System.Func<bool>>.Init(factory.Check_System_Func_bool);
|
||||
TypeTraits<UnityEngine.AudioClip.PCMReaderCallback>.Init(factory.Check_UnityEngine_AudioClip_PCMReaderCallback);
|
||||
TypeTraits<UnityEngine.AudioClip.PCMSetPositionCallback>.Init(factory.Check_UnityEngine_AudioClip_PCMSetPositionCallback);
|
||||
|
|
@ -317,6 +320,7 @@ public class DelegateFactory
|
|||
StackTraits<UnityEngine.Application.AdvertisingIdentifierCallback>.Push = factory.Push_UnityEngine_Application_AdvertisingIdentifierCallback;
|
||||
StackTraits<UnityEngine.Application.LowMemoryCallback>.Push = factory.Push_UnityEngine_Application_LowMemoryCallback;
|
||||
StackTraits<UnityEngine.Application.LogCallback>.Push = factory.Push_UnityEngine_Application_LogCallback;
|
||||
StackTraits<System.Action<bool>>.Push = factory.Push_System_Action_bool;
|
||||
StackTraits<System.Func<bool>>.Push = factory.Push_System_Func_bool;
|
||||
StackTraits<UnityEngine.AudioClip.PCMReaderCallback>.Push = factory.Push_UnityEngine_AudioClip_PCMReaderCallback;
|
||||
StackTraits<UnityEngine.AudioClip.PCMSetPositionCallback>.Push = factory.Push_UnityEngine_AudioClip_PCMSetPositionCallback;
|
||||
|
|
@ -3583,6 +3587,63 @@ public class DelegateFactory
|
|||
ToLua.Push(L, o);
|
||||
}
|
||||
|
||||
class System_Action_bool_Event : LuaDelegate
|
||||
{
|
||||
public System_Action_bool_Event(LuaFunction func) : base(func) { }
|
||||
public System_Action_bool_Event(LuaFunction func, LuaTable self) : base(func, self) { }
|
||||
|
||||
public void Call(bool param0)
|
||||
{
|
||||
func.BeginPCall();
|
||||
func.Push(param0);
|
||||
func.PCall();
|
||||
func.EndPCall();
|
||||
}
|
||||
|
||||
public void CallWithSelf(bool param0)
|
||||
{
|
||||
func.BeginPCall();
|
||||
func.Push(self);
|
||||
func.Push(param0);
|
||||
func.PCall();
|
||||
func.EndPCall();
|
||||
}
|
||||
}
|
||||
|
||||
public System.Action<bool> System_Action_bool(LuaFunction func, LuaTable self, bool flag)
|
||||
{
|
||||
if (func == null)
|
||||
{
|
||||
System.Action<bool> fn = delegate(bool param0) { };
|
||||
return fn;
|
||||
}
|
||||
|
||||
if(!flag)
|
||||
{
|
||||
System_Action_bool_Event target = new System_Action_bool_Event(func);
|
||||
System.Action<bool> d = target.Call;
|
||||
target.method = d.Method;
|
||||
return d;
|
||||
}
|
||||
else
|
||||
{
|
||||
System_Action_bool_Event target = new System_Action_bool_Event(func, self);
|
||||
System.Action<bool> d = target.CallWithSelf;
|
||||
target.method = d.Method;
|
||||
return d;
|
||||
}
|
||||
}
|
||||
|
||||
bool Check_System_Action_bool(IntPtr L, int pos)
|
||||
{
|
||||
return TypeChecker.CheckDelegateType(typeof(System.Action<bool>), L, pos);
|
||||
}
|
||||
|
||||
void Push_System_Action_bool(IntPtr L, System.Action<bool> o)
|
||||
{
|
||||
ToLua.Push(L, o);
|
||||
}
|
||||
|
||||
class System_Func_bool_Event : LuaDelegate
|
||||
{
|
||||
public System_Func_bool_Event(LuaFunction func) : base(func) { }
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ public class GameLogic_ResourcesManagerWrap
|
|||
L.RegFunction("HaveAsset", HaveAsset);
|
||||
L.RegFunction("UnLoadAll", UnLoadAll);
|
||||
L.RegFunction("Reset", Reset);
|
||||
L.RegFunction("ClearFilesCache", ClearFilesCache);
|
||||
L.RegFunction("New", _CreateGameLogic_ResourcesManager);
|
||||
L.RegFunction("__tostring", ToLua.op_ToString);
|
||||
L.RegVar("isLoading", get_isLoading, set_isLoading);
|
||||
|
|
@ -198,6 +199,22 @@ public class GameLogic_ResourcesManagerWrap
|
|||
}
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int ClearFilesCache(IntPtr L)
|
||||
{
|
||||
try
|
||||
{
|
||||
ToLua.CheckArgsCount(L, 1);
|
||||
GameLogic.ResourcesManager obj = (GameLogic.ResourcesManager)ToLua.CheckObject<GameLogic.ResourcesManager>(L, 1);
|
||||
obj.ClearFilesCache();
|
||||
return 0;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return LuaDLL.toluaL_exception(L, e);
|
||||
}
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int get_isLoading(IntPtr L)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ public class GameLogic_VersionManagerWrap
|
|||
L.RegFunction("GetLocalVersion", GetLocalVersion);
|
||||
L.RegFunction("VersionCompare", VersionCompare);
|
||||
L.RegFunction("GetVersionInfo", GetVersionInfo);
|
||||
L.RegFunction("CheckPackageVersionSame", CheckPackageVersionSame);
|
||||
L.RegFunction("New", _CreateGameLogic_VersionManager);
|
||||
L.RegFunction("__tostring", ToLua.op_ToString);
|
||||
L.EndClass();
|
||||
|
|
@ -117,8 +116,8 @@ public class GameLogic_VersionManagerWrap
|
|||
ToLua.CheckArgsCount(L, 2);
|
||||
string arg0 = ToLua.CheckString(L, 1);
|
||||
string arg1 = ToLua.CheckString(L, 2);
|
||||
int o = GameLogic.VersionManager.VersionCompare(arg0, arg1);
|
||||
LuaDLL.lua_pushinteger(L, o);
|
||||
ResUpdate.ResourcesUpdateState o = GameLogic.VersionManager.VersionCompare(arg0, arg1);
|
||||
ToLua.Push(L, o);
|
||||
return 1;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
|
@ -144,22 +143,5 @@ public class GameLogic_VersionManagerWrap
|
|||
return LuaDLL.toluaL_exception(L, e);
|
||||
}
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int CheckPackageVersionSame(IntPtr L)
|
||||
{
|
||||
try
|
||||
{
|
||||
ToLua.CheckArgsCount(L, 1);
|
||||
string arg0 = ToLua.CheckString(L, 1);
|
||||
bool o = GameLogic.VersionManager.CheckPackageVersionSame(arg0);
|
||||
LuaDLL.lua_pushboolean(L, o);
|
||||
return 1;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return LuaDLL.toluaL_exception(L, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -380,6 +380,7 @@ public static class LuaBinder
|
|||
L.RegFunction("Action_int", System_Action_int);
|
||||
L.RegFunction("Comparison_int", System_Comparison_int);
|
||||
L.RegFunction("Func_int_int", System_Func_int_int);
|
||||
L.RegFunction("Action_bool", System_Action_bool);
|
||||
L.RegFunction("Func_bool", System_Func_bool);
|
||||
L.RegFunction("Action_UnityEngine_AsyncOperation", System_Action_UnityEngine_AsyncOperation);
|
||||
L.RegFunction("Action_string", System_Action_string);
|
||||
|
|
@ -2404,6 +2405,33 @@ public static class LuaBinder
|
|||
}
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int System_Action_bool(IntPtr L)
|
||||
{
|
||||
try
|
||||
{
|
||||
int count = LuaDLL.lua_gettop(L);
|
||||
LuaFunction func = ToLua.CheckLuaFunction(L, 1);
|
||||
|
||||
if (count == 1)
|
||||
{
|
||||
Delegate arg1 = DelegateTraits<System.Action<bool>>.Create(func);
|
||||
ToLua.Push(L, arg1);
|
||||
}
|
||||
else
|
||||
{
|
||||
LuaTable self = ToLua.CheckLuaTable(L, 2);
|
||||
Delegate arg1 = DelegateTraits<System.Action<bool>>.Create(func, self);
|
||||
ToLua.Push(L, arg1);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
return LuaDLL.toluaL_exception(L, e);
|
||||
}
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int System_Func_bool(IntPtr L)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -17,6 +17,9 @@ public class ResUpdate_ResourcesUpdateStateWrap
|
|||
L.RegVar("UpdateResourcesFailed", get_UpdateResourcesFailed, null);
|
||||
L.RegVar("Success", get_Success, null);
|
||||
L.RegVar("OldPackageNeedChange", get_OldPackageNeedChange, null);
|
||||
L.RegVar("PackageNeedRes", get_PackageNeedRes, null);
|
||||
L.RegVar("Normal", get_Normal, null);
|
||||
L.RegVar("Err", get_Err, null);
|
||||
L.RegFunction("IntToEnum", IntToEnum);
|
||||
L.EndEnum();
|
||||
TypeTraits<ResUpdate.ResourcesUpdateState>.Check = CheckType;
|
||||
|
|
@ -103,6 +106,27 @@ public class ResUpdate_ResourcesUpdateStateWrap
|
|||
return 1;
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int get_PackageNeedRes(IntPtr L)
|
||||
{
|
||||
ToLua.Push(L, ResUpdate.ResourcesUpdateState.PackageNeedRes);
|
||||
return 1;
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int get_Normal(IntPtr L)
|
||||
{
|
||||
ToLua.Push(L, ResUpdate.ResourcesUpdateState.Normal);
|
||||
return 1;
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int get_Err(IntPtr L)
|
||||
{
|
||||
ToLua.Push(L, ResUpdate.ResourcesUpdateState.Err);
|
||||
return 1;
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int IntToEnum(IntPtr L)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ public class SDK_SDKManagerWrap
|
|||
L.RegFunction("Pay", Pay);
|
||||
L.RegFunction("IsSupportExit", IsSupportExit);
|
||||
L.RegFunction("ExitGame", ExitGame);
|
||||
L.RegFunction("ClearFileCacheAndroid", ClearFileCacheAndroid);
|
||||
L.RegFunction("GetPayOrderID", GetPayOrderID);
|
||||
L.RegFunction("CaptureShot", CaptureShot);
|
||||
L.RegFunction("CustomEvent", CustomEvent);
|
||||
|
|
@ -174,6 +175,22 @@ public class SDK_SDKManagerWrap
|
|||
}
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int ClearFileCacheAndroid(IntPtr L)
|
||||
{
|
||||
try
|
||||
{
|
||||
ToLua.CheckArgsCount(L, 1);
|
||||
SDK.SDKManager obj = (SDK.SDKManager)ToLua.CheckObject<SDK.SDKManager>(L, 1);
|
||||
obj.ClearFileCacheAndroid();
|
||||
return 0;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return LuaDLL.toluaL_exception(L, e);
|
||||
}
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int GetPayOrderID(IntPtr L)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ public class UnityEngine_ApplicationWrap
|
|||
L.RegVar("logMessageReceived", get_logMessageReceived, set_logMessageReceived);
|
||||
L.RegVar("logMessageReceivedThreaded", get_logMessageReceivedThreaded, set_logMessageReceivedThreaded);
|
||||
L.RegVar("onBeforeRender", get_onBeforeRender, set_onBeforeRender);
|
||||
L.RegVar("focusChanged", get_focusChanged, set_focusChanged);
|
||||
L.RegVar("wantsToQuit", get_wantsToQuit, set_wantsToQuit);
|
||||
L.RegVar("quitting", get_quitting, set_quitting);
|
||||
L.RegFunction("AdvertisingIdentifierCallback", UnityEngine_Application_AdvertisingIdentifierCallback);
|
||||
|
|
@ -752,6 +753,13 @@ public class UnityEngine_ApplicationWrap
|
|||
return 1;
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int get_focusChanged(IntPtr L)
|
||||
{
|
||||
ToLua.Push(L, new EventObject(typeof(System.Action<bool>)));
|
||||
return 1;
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int get_wantsToQuit(IntPtr L)
|
||||
{
|
||||
|
|
@ -951,6 +959,41 @@ public class UnityEngine_ApplicationWrap
|
|||
}
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int set_focusChanged(IntPtr L)
|
||||
{
|
||||
try
|
||||
{
|
||||
EventObject arg0 = null;
|
||||
|
||||
if (LuaDLL.lua_isuserdata(L, 2) != 0)
|
||||
{
|
||||
arg0 = (EventObject)ToLua.ToObject(L, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
return LuaDLL.luaL_throw(L, "The event 'UnityEngine.Application.focusChanged' can only appear on the left hand side of += or -= when used outside of the type 'UnityEngine.Application'");
|
||||
}
|
||||
|
||||
if (arg0.op == EventOp.Add)
|
||||
{
|
||||
System.Action<bool> ev = (System.Action<bool>)arg0.func;
|
||||
UnityEngine.Application.focusChanged += ev;
|
||||
}
|
||||
else if (arg0.op == EventOp.Sub)
|
||||
{
|
||||
System.Action<bool> ev = (System.Action<bool>)arg0.func;
|
||||
UnityEngine.Application.focusChanged -= ev;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return LuaDLL.toluaL_exception(L, e);
|
||||
}
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int set_wantsToQuit(IntPtr L)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,9 +27,8 @@ public class UnityEngine_UI_LayoutUtilityWrap
|
|||
{
|
||||
ToLua.CheckArgsCount(L, 2);
|
||||
UnityEngine.RectTransform arg0 = (UnityEngine.RectTransform)ToLua.CheckObject(L, 1, typeof(UnityEngine.RectTransform));
|
||||
UnityEngine.UI.LayoutRebuilder.ForceRebuildLayoutImmediate(arg0);
|
||||
int arg1 = (int)LuaDLL.luaL_checknumber(L, 2);
|
||||
float o = UnityEngine.UI.LayoutUtility.GetMinSize(arg0, arg1);
|
||||
int arg1 = (int)LuaDLL.luaL_checknumber(L, 2);
|
||||
float o = UnityEngine.UI.LayoutUtility.GetMinSize(arg0, arg1);
|
||||
LuaDLL.lua_pushnumber(L, o);
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -46,8 +45,7 @@ public class UnityEngine_UI_LayoutUtilityWrap
|
|||
{
|
||||
ToLua.CheckArgsCount(L, 2);
|
||||
UnityEngine.RectTransform arg0 = (UnityEngine.RectTransform)ToLua.CheckObject(L, 1, typeof(UnityEngine.RectTransform));
|
||||
UnityEngine.UI.LayoutRebuilder.ForceRebuildLayoutImmediate(arg0);
|
||||
int arg1 = (int)LuaDLL.luaL_checknumber(L, 2);
|
||||
int arg1 = (int)LuaDLL.luaL_checknumber(L, 2);
|
||||
float o = UnityEngine.UI.LayoutUtility.GetPreferredSize(arg0, arg1);
|
||||
LuaDLL.lua_pushnumber(L, o);
|
||||
return 1;
|
||||
|
|
@ -65,8 +63,7 @@ public class UnityEngine_UI_LayoutUtilityWrap
|
|||
{
|
||||
ToLua.CheckArgsCount(L, 2);
|
||||
UnityEngine.RectTransform arg0 = (UnityEngine.RectTransform)ToLua.CheckObject(L, 1, typeof(UnityEngine.RectTransform));
|
||||
UnityEngine.UI.LayoutRebuilder.ForceRebuildLayoutImmediate(arg0);
|
||||
int arg1 = (int)LuaDLL.luaL_checknumber(L, 2);
|
||||
int arg1 = (int)LuaDLL.luaL_checknumber(L, 2);
|
||||
float o = UnityEngine.UI.LayoutUtility.GetFlexibleSize(arg0, arg1);
|
||||
LuaDLL.lua_pushnumber(L, o);
|
||||
return 1;
|
||||
|
|
@ -84,8 +81,7 @@ public class UnityEngine_UI_LayoutUtilityWrap
|
|||
{
|
||||
ToLua.CheckArgsCount(L, 1);
|
||||
UnityEngine.RectTransform arg0 = (UnityEngine.RectTransform)ToLua.CheckObject(L, 1, typeof(UnityEngine.RectTransform));
|
||||
UnityEngine.UI.LayoutRebuilder.ForceRebuildLayoutImmediate(arg0);
|
||||
float o = UnityEngine.UI.LayoutUtility.GetMinWidth(arg0);
|
||||
float o = UnityEngine.UI.LayoutUtility.GetMinWidth(arg0);
|
||||
LuaDLL.lua_pushnumber(L, o);
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -102,8 +98,7 @@ public class UnityEngine_UI_LayoutUtilityWrap
|
|||
{
|
||||
ToLua.CheckArgsCount(L, 1);
|
||||
UnityEngine.RectTransform arg0 = (UnityEngine.RectTransform)ToLua.CheckObject(L, 1, typeof(UnityEngine.RectTransform));
|
||||
UnityEngine.UI.LayoutRebuilder.ForceRebuildLayoutImmediate(arg0);
|
||||
float o = UnityEngine.UI.LayoutUtility.GetPreferredWidth(arg0);
|
||||
float o = UnityEngine.UI.LayoutUtility.GetPreferredWidth(arg0);
|
||||
LuaDLL.lua_pushnumber(L, o);
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -120,8 +115,7 @@ public class UnityEngine_UI_LayoutUtilityWrap
|
|||
{
|
||||
ToLua.CheckArgsCount(L, 1);
|
||||
UnityEngine.RectTransform arg0 = (UnityEngine.RectTransform)ToLua.CheckObject(L, 1, typeof(UnityEngine.RectTransform));
|
||||
UnityEngine.UI.LayoutRebuilder.ForceRebuildLayoutImmediate(arg0);
|
||||
float o = UnityEngine.UI.LayoutUtility.GetFlexibleWidth(arg0);
|
||||
float o = UnityEngine.UI.LayoutUtility.GetFlexibleWidth(arg0);
|
||||
LuaDLL.lua_pushnumber(L, o);
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -138,8 +132,7 @@ public class UnityEngine_UI_LayoutUtilityWrap
|
|||
{
|
||||
ToLua.CheckArgsCount(L, 1);
|
||||
UnityEngine.RectTransform arg0 = (UnityEngine.RectTransform)ToLua.CheckObject(L, 1, typeof(UnityEngine.RectTransform));
|
||||
UnityEngine.UI.LayoutRebuilder.ForceRebuildLayoutImmediate(arg0);
|
||||
float o = UnityEngine.UI.LayoutUtility.GetMinHeight(arg0);
|
||||
float o = UnityEngine.UI.LayoutUtility.GetMinHeight(arg0);
|
||||
LuaDLL.lua_pushnumber(L, o);
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -156,8 +149,7 @@ public class UnityEngine_UI_LayoutUtilityWrap
|
|||
{
|
||||
ToLua.CheckArgsCount(L, 1);
|
||||
UnityEngine.RectTransform arg0 = (UnityEngine.RectTransform)ToLua.CheckObject(L, 1, typeof(UnityEngine.RectTransform));
|
||||
UnityEngine.UI.LayoutRebuilder.ForceRebuildLayoutImmediate(arg0);
|
||||
float o = UnityEngine.UI.LayoutUtility.GetPreferredHeight(arg0);
|
||||
float o = UnityEngine.UI.LayoutUtility.GetPreferredHeight(arg0);
|
||||
LuaDLL.lua_pushnumber(L, o);
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -174,8 +166,7 @@ public class UnityEngine_UI_LayoutUtilityWrap
|
|||
{
|
||||
ToLua.CheckArgsCount(L, 1);
|
||||
UnityEngine.RectTransform arg0 = (UnityEngine.RectTransform)ToLua.CheckObject(L, 1, typeof(UnityEngine.RectTransform));
|
||||
UnityEngine.UI.LayoutRebuilder.ForceRebuildLayoutImmediate(arg0);
|
||||
float o = UnityEngine.UI.LayoutUtility.GetFlexibleHeight(arg0);
|
||||
float o = UnityEngine.UI.LayoutUtility.GetFlexibleHeight(arg0);
|
||||
LuaDLL.lua_pushnumber(L, o);
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -195,8 +186,7 @@ public class UnityEngine_UI_LayoutUtilityWrap
|
|||
if (count == 3)
|
||||
{
|
||||
UnityEngine.RectTransform arg0 = (UnityEngine.RectTransform)ToLua.CheckObject(L, 1, typeof(UnityEngine.RectTransform));
|
||||
UnityEngine.UI.LayoutRebuilder.ForceRebuildLayoutImmediate(arg0);
|
||||
System.Func<UnityEngine.UI.ILayoutElement,float> arg1 = (System.Func<UnityEngine.UI.ILayoutElement,float>)ToLua.CheckDelegate<System.Func<UnityEngine.UI.ILayoutElement,float>>(L, 2);
|
||||
System.Func<UnityEngine.UI.ILayoutElement,float> arg1 = (System.Func<UnityEngine.UI.ILayoutElement,float>)ToLua.CheckDelegate<System.Func<UnityEngine.UI.ILayoutElement,float>>(L, 2);
|
||||
float arg2 = (float)LuaDLL.luaL_checknumber(L, 3);
|
||||
float o = UnityEngine.UI.LayoutUtility.GetLayoutProperty(arg0, arg1, arg2);
|
||||
LuaDLL.lua_pushnumber(L, o);
|
||||
|
|
@ -205,8 +195,7 @@ public class UnityEngine_UI_LayoutUtilityWrap
|
|||
else if (count == 4)
|
||||
{
|
||||
UnityEngine.RectTransform arg0 = (UnityEngine.RectTransform)ToLua.CheckObject(L, 1, typeof(UnityEngine.RectTransform));
|
||||
UnityEngine.UI.LayoutRebuilder.ForceRebuildLayoutImmediate(arg0);
|
||||
System.Func<UnityEngine.UI.ILayoutElement,float> arg1 = (System.Func<UnityEngine.UI.ILayoutElement,float>)ToLua.CheckDelegate<System.Func<UnityEngine.UI.ILayoutElement,float>>(L, 2);
|
||||
System.Func<UnityEngine.UI.ILayoutElement,float> arg1 = (System.Func<UnityEngine.UI.ILayoutElement,float>)ToLua.CheckDelegate<System.Func<UnityEngine.UI.ILayoutElement,float>>(L, 2);
|
||||
float arg2 = (float)LuaDLL.luaL_checknumber(L, 3);
|
||||
UnityEngine.UI.ILayoutElement arg3 = null;
|
||||
float o = UnityEngine.UI.LayoutUtility.GetLayoutProperty(arg0, arg1, arg2, out arg3);
|
||||
|
|
|
|||
Loading…
Reference in New Issue