From b4bb2eddfffe867118ee0102660547a90ac51b0b Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Wed, 30 Jun 2021 14:10:30 +0800 Subject: [PATCH 01/20] =?UTF-8?q?=E5=85=B3=E9=97=AD=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E6=97=B6=20=E7=A7=B0=E5=8F=B7=E9=A2=84=E8=AE=BE=E6=9C=AA?= =?UTF-8?q?=E5=85=B3=E9=97=AD=20=E9=94=99=E8=AF=AF=20=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Popup/PlayerInfoPopup.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/PlayerInfoPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/PlayerInfoPopup.lua index 4b0b027e56..0434ea3695 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/PlayerInfoPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/PlayerInfoPopup.lua @@ -231,6 +231,10 @@ function this.RefreshPlayerInfo(data) -- sortingorder = this.sortingOrder -- end LogError("title=="..title) + if titleLive then + SubUIManager.Close(titleLive) + titleLive = nil + end if not titleLive then titleLive = SubUIManager.Open(SubUIConfig.PlayerTitle, this.titlePar.transform) titleLive:SetShow(title, Vector3.New(0,0,0), 0.5, 0.03*20, this.sortingOrder) @@ -464,6 +468,10 @@ end --界面关闭时调用(用于子类重写) function PlayerInfoPopup:OnClose() this.imprintObj:SetActive(false) + if titleLive then + SubUIManager.Close(titleLive) + titleLive = nil + end end --界面销毁时调用(用于子类重写) From de446ace5ce9003df9b39f54ba87270b485b5531 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Wed, 30 Jun 2021 17:19:55 +0800 Subject: [PATCH 02/20] =?UTF-8?q?=E9=A6=96=E5=85=85=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E9=A2=86=E5=8F=96=E4=BF=AE=E6=94=B9=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/ManagedResources/~Lua/Common/functions.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/ManagedResources/~Lua/Common/functions.lua b/Assets/ManagedResources/~Lua/Common/functions.lua index 1181918e46..e2b89c7c91 100644 --- a/Assets/ManagedResources/~Lua/Common/functions.lua +++ b/Assets/ManagedResources/~Lua/Common/functions.lua @@ -1291,7 +1291,7 @@ function GetTimePass(timeValue) forwardDay = 0 end local dayPass = math.ceil((GetTimeStamp() - timeStartSum) / 86400) - return (dayPass + forwardDay) > 3 and 3 or (dayPass + forwardDay) + return (dayPass + forwardDay) > 7 and 7 or (dayPass + forwardDay) end ---时间格式化接口 From ab339f2b37c36909eb3c8a4b030a81d5da864ff7 Mon Sep 17 00:00:00 2001 From: JLIOSM1 <774727341@qq.com> Date: Wed, 7 Jul 2021 16:44:21 +0800 Subject: [PATCH 03/20] =?UTF-8?q?=E3=80=90IOS=E3=80=91=E6=B7=BB=E5=8A=A0IO?= =?UTF-8?q?S=E6=89=A7=E8=A1=8C=E5=91=BD=E4=BB=A4=E8=A1=8C=E7=9A=84?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Editor/Util/ProcessUtil.cs | 34 +++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/Assets/Scripts/Editor/Util/ProcessUtil.cs b/Assets/Scripts/Editor/Util/ProcessUtil.cs index 43da873b71..7b3d864b10 100644 --- a/Assets/Scripts/Editor/Util/ProcessUtil.cs +++ b/Assets/Scripts/Editor/Util/ProcessUtil.cs @@ -55,6 +55,39 @@ namespace GameEditor.Util } public static void ProcessCommand(string dir, string[] coms, bool isShowWindow = false) { +#if UNITY_IOS + string shellPath = Path.Combine(dir, "coms.shell"); + if (!File.Exists(shellPath)) + { + File.Create(shellPath).Close(); + } + File.WriteAllLines(shellPath, coms); + + System.Diagnostics.Process p = new System.Diagnostics.Process(); + //设置要启动的应用程序 + p.StartInfo.FileName = "/bin/bash"; + //是否使用操作系统shell启动 + p.StartInfo.UseShellExecute = false; + //接受来自调用程序的输入信息 + p.StartInfo.RedirectStandardInput = false; + //输出信息 + p.StartInfo.RedirectStandardOutput = false; + //输出错误 + p.StartInfo.RedirectStandardError = false; + //不显示程序窗口 + p.StartInfo.CreateNoWindow = !isShowWindow; + //设置文件夹 + p.StartInfo.WorkingDirectory = dir; + p.StartInfo.Arguments = shellPath; + //启动程序 + p.Start(); + //等待程序执行完退出进程 + p.WaitForExit(); + //关闭 + p.Close(); + //删除命令行文件 + File.Delete(shellPath); +#else System.Diagnostics.Process p = new System.Diagnostics.Process(); //设置要启动的应用程序 p.StartInfo.FileName = "cmd.exe"; @@ -86,6 +119,7 @@ namespace GameEditor.Util //等待程序执行完退出进程 //p.WaitForExit(); p.Close(); +#endif } From 273131cb4cfe3494cca96fd94f53d45b2e9c9087 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Wed, 7 Jul 2021 11:28:50 +0800 Subject: [PATCH 04/20] =?UTF-8?q?=E7=99=BE=E5=AE=9D=E5=95=86=E4=BC=9A?= =?UTF-8?q?=E6=96=87=E5=AD=97=E9=94=99=E4=B9=B1=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Common/MoneyUtil.lua | 19 +++++++++++++++++++ .../TreasureStore/TreasureStorePopup.lua | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Common/MoneyUtil.lua b/Assets/ManagedResources/~Lua/Modules/Common/MoneyUtil.lua index da61e28077..1c69786843 100644 --- a/Assets/ManagedResources/~Lua/Modules/Common/MoneyUtil.lua +++ b/Assets/ManagedResources/~Lua/Modules/Common/MoneyUtil.lua @@ -71,5 +71,24 @@ function this.GetMoneyUnitNameWithMoney(money) return string.format(formater, this.GetMoney(money)) end +-- 获取货币单位名称 +local _t2n2 = { + [MoneyType.RMB] = "%s\n元", + [MoneyType.USD] = "$\n%s", +} +function this.GetMoneyUnitName1(mt) + if not mt then + mt = this.MT + end + if _t2n2[mt] then + return _t2n2[mt] + end + return _t2n2[MoneyType.RMB] +end +function this.GetMoneyUnitNameWithMoney1(money) + local formater = this.GetMoneyUnitName1() + return string.format(formater, this.GetMoney(money)) +end + return MoneyUtil \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/Modules/TreasureStore/TreasureStorePopup.lua b/Assets/ManagedResources/~Lua/Modules/TreasureStore/TreasureStorePopup.lua index 9da6ca5458..566f118b67 100644 --- a/Assets/ManagedResources/~Lua/Modules/TreasureStore/TreasureStorePopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/TreasureStore/TreasureStorePopup.lua @@ -201,7 +201,7 @@ function this:SetScrollPre(root,data) itemList[i].Name = Util.GetGameObject(itemList[i].go,"Name"):GetComponent("Text") end local config = ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig,data.Id) - title.text = string.format("价\n值\n%s\n现\n仅\n需\n%s",MoneyUtil.GetMoneyUnitNameWithMoney(config.Rebate),MoneyUtil.GetMoneyUnitNameWithMoney(config.Price)) + title.text = string.format("价\n值\n%s\n现\n仅\n需\n%s",MoneyUtil.GetMoneyUnitNameWithMoney1(config.Rebate),MoneyUtil.GetMoneyUnitNameWithMoney1(config.Price)) local rewardArray = data.RewardShow if not itemsGrid then itemsGrid = {} From 8c8456b3a621ac3544d46228177bae7b04360cd9 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Wed, 7 Jul 2021 11:30:21 +0800 Subject: [PATCH 05/20] =?UTF-8?q?=E7=99=BE=E5=AE=9D=E5=95=86=E4=BC=9A?= =?UTF-8?q?=E6=96=87=E5=AD=97=E9=94=99=E4=B9=B1=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/TreasureStore/TreasureStorePopup.lua | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/TreasureStore/TreasureStorePopup.lua b/Assets/ManagedResources/~Lua/Modules/TreasureStore/TreasureStorePopup.lua index 566f118b67..bf1040d57f 100644 --- a/Assets/ManagedResources/~Lua/Modules/TreasureStore/TreasureStorePopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/TreasureStore/TreasureStorePopup.lua @@ -170,13 +170,7 @@ function this.SortData(allData) return end table.sort(allData, function(a,b) - -- local aboughtNum = a.Limit - OperatingManager.GetGoodsBuyTime(GoodsTypeDef.DirectPurchaseGift, a.Id) > 0 and 2 or 1 - -- local bboughtNum = b.Limit - OperatingManager.GetGoodsBuyTime(GoodsTypeDef.DirectPurchaseGift, b.Id) > 0 and 2 or 1 - -- if aboughtNum == bboughtNum then - return a.Id < b.Id - -- else - -- return aboughtNum > bboughtNum - -- end + return a.Sort < b.Sort end) return allData end From ad6f24b8d07cf54564482396fe65c8472d081bd2 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Wed, 7 Jul 2021 11:44:40 +0800 Subject: [PATCH 06/20] =?UTF-8?q?=E6=8E=92=E5=BA=8F=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/TreasureStore/TreasureStorePopup.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/ManagedResources/~Lua/Modules/TreasureStore/TreasureStorePopup.lua b/Assets/ManagedResources/~Lua/Modules/TreasureStore/TreasureStorePopup.lua index bf1040d57f..fa77936421 100644 --- a/Assets/ManagedResources/~Lua/Modules/TreasureStore/TreasureStorePopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/TreasureStore/TreasureStorePopup.lua @@ -170,7 +170,7 @@ function this.SortData(allData) return end table.sort(allData, function(a,b) - return a.Sort < b.Sort + return a.Sequence < b.Sequence end) return allData end @@ -234,6 +234,7 @@ function this:SetScrollPre(root,data) end local boughtNum = OperatingManager.GetGoodsBuyTime(GoodsTypeDef.DirectPurchaseGift, data.Id) or 0 + LogGreen("boughtNum:"..boughtNum) tip.text =Language[10580].. (data.Limit-boughtNum) ..Language[10048] buyNum.text =string.format(MoneyUtil.GetMoneyUnitName(), MoneyUtil.GetMoney(data.Price))--shopItemData.Price..MoneyUtil.GetMoneyUnitName() if data.Limit - boughtNum > 0 then From 212619798746ade4855cf6a5b45c36a0844a8482 Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Fri, 9 Jul 2021 16:56:05 +0800 Subject: [PATCH 07/20] =?UTF-8?q?=E3=80=90=E7=A5=9E=E5=B0=86=E5=8D=87?= =?UTF-8?q?=E7=BA=A7=E3=80=91=E5=8D=87=E7=BA=A7=E5=8A=A0=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Harmony/Manager/HarmonyManager.lua | 3 +++ .../~Lua/Modules/RoleInfo/RoleInfoLayout.lua | 16 +++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua b/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua index c2bd3642cd..80b4ced01a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua @@ -667,4 +667,7 @@ function this.WarPowerChangeNotify(did) end end +function this.IsGongMing(_curHeroData) + return this.IsChangeColor(_curHeroData.dynamicId) or (this:IsEnvoy(_curHeroData.dynamicId) and this:HongMengTowerUpLimit() ~= 0) +end return HarmonyManager \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua index 65948379dc..34ec5362cc 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua @@ -87,13 +87,19 @@ end function RoleInfoLayout:BindEvent() --升级 Util.AddClick(this.upLvBtn, function() + if this.isGongMing then + PopupTipPanel.ShowTip("神将正在共鸣中,无法升级!") + return + end if Time.realtimeSinceStartup - RoleInfoLayout.timePressStarted <= 0.4 then - -- --LogGreen("upLvBtn ") this:LvUpClick(true) end end) --长按升级按下状态 this._onPointerDown = function(Pointgo, data) + if this.isGongMing then + return + end isTriggerLongClick = false _isClicked = true RoleInfoLayout.timePressStarted = Time.realtimeSinceStartup @@ -101,6 +107,10 @@ function RoleInfoLayout:BindEvent() end --长按升级抬起状态 this._onPointerUp = function(Pointgo, data) + if this.isGongMing then + PopupTipPanel.ShowTip("神将正在共鸣中,无法升级!") + return + end if _isLongPress and isTriggerLongClick then --连续升级抬起请求升级 this:LongLvUpClick(oldLv) @@ -268,8 +278,8 @@ function this:UpdateHeroUpLvAndBreakMaterialShow() end end - local isGongMing = HarmonyManager.IsChangeColor(curHeroData.dynamicId) or (HarmonyManager:IsEnvoy(curHeroData.dynamicId) and HarmonyManager:HongMengTowerUpLimit() ~= 0) - if isGongMing then + this.isGongMing = HarmonyManager.IsGongMing(curHeroData) + if this.isGongMing then this.gongmingText:SetActive(true) this.upLv:SetActive(false) -- this.upLvBtn:SetActive(false) From 683a13bf2a42ae87745030a8054c57b6f73e7957 Mon Sep 17 00:00:00 2001 From: JLIOSM1 <774727341@qq.com> Date: Mon, 12 Jul 2021 18:31:52 +0800 Subject: [PATCH 08/20] =?UTF-8?q?=E3=80=90IOS=E3=80=91=E4=BF=AE=E6=94=B9iO?= =?UTF-8?q?S=E5=8C=85=E7=9A=84AB=E5=8C=85=E7=9B=AE=E5=BD=95=E7=BB=93?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GameEditor/AssetBundle/Core/AssetBundleBuilder.cs | 3 +++ .../Scripts/Editor/GameEditor/FrameTool/BuildWindow.cs | 7 +++++++ Assets/Scripts/GameInit/GameStart.cs | 10 ++++++++-- Assets/Scripts/GameInit/UpdateManager.cs | 10 ++++++++-- 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/Assets/Scripts/Editor/GameEditor/AssetBundle/Core/AssetBundleBuilder.cs b/Assets/Scripts/Editor/GameEditor/AssetBundle/Core/AssetBundleBuilder.cs index cbe6c65c49..5d7fd17f22 100644 --- a/Assets/Scripts/Editor/GameEditor/AssetBundle/Core/AssetBundleBuilder.cs +++ b/Assets/Scripts/Editor/GameEditor/AssetBundle/Core/AssetBundleBuilder.cs @@ -552,6 +552,9 @@ namespace GameEditor.AssetBundle string assetBundleName = path.Replace(GameLogic.AppConst.GameResName + "/",string.Empty); assetBundleName = compressType.ToString() + "/" + assetBundleName; +#if PLATFORM_IOS + assetBundleName = assetBundleName.Replace("/", "_"); +#endif //Debug.LogError("path:" + path + " => abname:" + assetBundleName); return assetBundleName; } diff --git a/Assets/Scripts/Editor/GameEditor/FrameTool/BuildWindow.cs b/Assets/Scripts/Editor/GameEditor/FrameTool/BuildWindow.cs index 3ea421fbac..1e6c709916 100644 --- a/Assets/Scripts/Editor/GameEditor/FrameTool/BuildWindow.cs +++ b/Assets/Scripts/Editor/GameEditor/FrameTool/BuildWindow.cs @@ -125,8 +125,15 @@ namespace GameEditor.FrameTool { { string exportPath = AssetBundle.AssetBundleConfig.GetExportPath(EditorUserBuildSettings.activeBuildTarget); string targetPath = FrameTool.GetStreamingAssetPath(EditorUserBuildSettings.activeBuildTarget); + +#if PLATFORM_IOS + File.Copy(exportPath + "/lzma_luabytes.unity3d", targetPath + "/lzma_luabytes.unity3d", true); + File.Copy(exportPath + "/lzma_resconfigs.unity3d", targetPath + "/lzma_resconfigs.unity3d", true); +#else File.Copy(exportPath + "/lzma/luabytes.unity3d", targetPath + "/lzma/luabytes.unity3d", true); File.Copy(exportPath + "/lzma/resconfigs.unity3d", targetPath + "/lzma/resconfigs.unity3d", true); +#endif + File.Copy(exportPath + "/files.unity3d", targetPath + "/files.unity3d", true); //SaveVersionFile(); } diff --git a/Assets/Scripts/GameInit/GameStart.cs b/Assets/Scripts/GameInit/GameStart.cs index 0aa0201784..47bcbb14a5 100644 --- a/Assets/Scripts/GameInit/GameStart.cs +++ b/Assets/Scripts/GameInit/GameStart.cs @@ -52,10 +52,16 @@ public class GameStart : MonoBehaviour bool isShowSplash = true; if (isShowSplash) { - string path = AppConst.PersistentDataPath + "lz4/splashpanel.unity3d"; +#if PLATFORM_IOS + string splashFilePath = "lz4_splashpanel.unity3d"; +#else + string splashFilePath = "lz4/splashpanel.unity3d"; +#endif + + string path = AppConst.PersistentDataPath + splashFilePath; if (!File.Exists(path)) { - path = AppConst.StreamPath + "lz4/splashpanel.unity3d"; + path = AppConst.StreamPath + splashFilePath; } bundle = AssetBundle.LoadFromFile(path, 0, GameLogic.AppConst.EncyptBytesLength); GameObject gameObj = bundle.LoadAsset("SplashPanel"); diff --git a/Assets/Scripts/GameInit/UpdateManager.cs b/Assets/Scripts/GameInit/UpdateManager.cs index cdeefded53..66a6843c1f 100644 --- a/Assets/Scripts/GameInit/UpdateManager.cs +++ b/Assets/Scripts/GameInit/UpdateManager.cs @@ -114,10 +114,16 @@ namespace GameLogic { void CreateUpdatePanel() { if (AppConst.bundleMode) { - string path = AppConst.PersistentDataPath + "lz4/updatepanel.unity3d"; +#if PLATFORM_IOS + string updateFilePath = "lz4_updatepanel.unity3d"; +#else + string updateFilePath = "lz4/updatepanel.unity3d"; +#endif + + string path = AppConst.PersistentDataPath + updateFilePath; if (!File.Exists(path)) { - path = AppConst.StreamPath + "lz4/updatepanel.unity3d"; + path = AppConst.StreamPath + updateFilePath; } bundle = AssetBundle.LoadFromFile(path, 0, GameLogic.AppConst.EncyptBytesLength); if (bundle == null) From fa1e3e15e096f3c721340302a9aac4a0806c59e2 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Tue, 13 Jul 2021 11:19:01 +0800 Subject: [PATCH 09/20] =?UTF-8?q?=E3=80=90=E8=A7=92=E8=89=B2=E5=8D=87?= =?UTF-8?q?=E7=BA=A7=E3=80=91=E4=BF=AE=E5=A4=8D=E9=AB=98=E6=98=9F=E7=BA=A7?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E5=8D=87=E7=BA=A7=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/RoleInfo/RoleInfoLayout.lua | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua index 597edef0f1..8467f0d564 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua @@ -159,7 +159,7 @@ end --更新英雄情报数据 function this:UpdateHeroInfoData() curTuPoRankUpConfig = heroRankupConfig[curHeroData.breakId] - curStarRankUpConfig=heroRankupConfig[curHeroData.upStarId] + curStarRankUpConfig = heroRankupConfig[curHeroData.upStarId] local EquipSignUnlock = ConfigManager.GetConfigData(ConfigName.GameSetting,1).EquipSignUnlock --动态品阶 local pId=0 --当前突破的阶数 @@ -435,10 +435,31 @@ function RoleInfoLayout:OnSortingOrderChange() end function RoleInfoLayout:IsCanUpLv(curLv, targetLv) + -- 如果是进阶不用判断 if isHeroUpTuPo and curLv == upTuPoRankUpConfig.LimitLevel then return true end - if (not curTuPoRankUpConfig and targetLv > 30) or (curTuPoRankUpConfig and targetLv > curTuPoRankUpConfig.OpenLevel) then + + -- 没有突破等级时,最大等级为30级 + local limitLv + if not curTuPoRankUpConfig then + limitLv = 30 + end + -- + if curTuPoRankUpConfig then + -- 有突破等级,最大等级为当前突破等级的开放等级 + if not limitLv or limitLv > curTuPoRankUpConfig.OpenLevel then + limitLv = curTuPoRankUpConfig.OpenLevel + end + -- 如果当前达到了最大的突破阶段,最大等级为当前星级的开放等级 + if curTuPoRankUpConfig.Id == 6 then --curTuPoRankUpConfig.Id == 17 四星英雄最大突破等级配置ID为17 + if curStarRankUpConfig then + limitLv = curStarRankUpConfig.OpenLevel + end + end + end + -- 如果目标等级超过限制则不让升级 + if targetLv > limitLv then return false end return true @@ -486,6 +507,7 @@ function RoleInfoLayout:LvUpClick(isSingleLvUp) if isUpLvMaterials then if isSingleLvUp then--是否是单次升级 if not this:IsCanUpLv(curHeroData.lv, curHeroData.lv + 1) then + Log("无法升级") PopupTipPanel.ShowTip("无法升级") return end @@ -519,6 +541,7 @@ function RoleInfoLayout:LvUpClick(isSingleLvUp) if isSingleLvUp then--是否是单次升级 -- 判断是否可以升级 if not this:IsCanUpLv(curHeroData.lv, curHeroData.lv + 1) then + Log("无法升级") PopupTipPanel.ShowTip("无法升级") return end @@ -550,6 +573,7 @@ end function RoleInfoLayout:LongLvUpClick(oldLv) -- 判断是否可以升级 if not this:IsCanUpLv(oldLv, curHeroData.lv) then + Log("无法升级") PopupTipPanel.ShowTip("无法升级") return end From b2f88a0d291721dee15afdb197f691440c981199 Mon Sep 17 00:00:00 2001 From: JLIOSM1 <774727341@qq.com> Date: Tue, 13 Jul 2021 18:20:03 +0800 Subject: [PATCH 10/20] =?UTF-8?q?=E3=80=90ios=E3=80=91=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=AE=8F=E5=AE=9A=E4=B9=89=EF=BC=8C=E4=BF=AE=E5=A4=8Dresconfig?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ResMgr/ResourcesMgr/ResLoader/RuntimeResLoader.cs | 9 +++++++-- Assets/Scripts/GameInit/GameStart.cs | 2 +- Assets/Scripts/GameInit/UpdateManager.cs | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Assets/Scripts/Core/ResMgr/ResourcesMgr/ResLoader/RuntimeResLoader.cs b/Assets/Scripts/Core/ResMgr/ResourcesMgr/ResLoader/RuntimeResLoader.cs index 97f8e327ae..c0793e7377 100644 --- a/Assets/Scripts/Core/ResMgr/ResourcesMgr/ResLoader/RuntimeResLoader.cs +++ b/Assets/Scripts/Core/ResMgr/ResourcesMgr/ResLoader/RuntimeResLoader.cs @@ -173,8 +173,13 @@ namespace ResMgr /// void InitResPathConfig() { - string path = string.Format("LZMA/ResConfigs").ToLower() + ResConfig.ABExtName; - string fullPath = PathHelper.GetFullPath (path); + +#if UNITY_IOS + string path = string.Format("LZMA_ResConfigs").ToLower() + ResConfig.ABExtName; +#else + string path = string.Format("LZMA/ResConfigs").ToLower() + ResConfig.ABExtName; +#endif + string fullPath = PathHelper.GetFullPath (path); AssetBundle ab = AssetBundle.LoadFromFile(fullPath, 0, GameLogic.AppConst.EncyptBytesLength); //AssetBundle ab = AssetBundle.LoadFromMemory(XXTEA.Decrypt(File.ReadAllBytes(fullPath))); ResPathConfig = ab.LoadAsset("ResourcePathConfig"); diff --git a/Assets/Scripts/GameInit/GameStart.cs b/Assets/Scripts/GameInit/GameStart.cs index 47bcbb14a5..c9762a57b8 100644 --- a/Assets/Scripts/GameInit/GameStart.cs +++ b/Assets/Scripts/GameInit/GameStart.cs @@ -52,7 +52,7 @@ public class GameStart : MonoBehaviour bool isShowSplash = true; if (isShowSplash) { -#if PLATFORM_IOS +#if UNITY_IOS string splashFilePath = "lz4_splashpanel.unity3d"; #else string splashFilePath = "lz4/splashpanel.unity3d"; diff --git a/Assets/Scripts/GameInit/UpdateManager.cs b/Assets/Scripts/GameInit/UpdateManager.cs index 66a6843c1f..22020c9e22 100644 --- a/Assets/Scripts/GameInit/UpdateManager.cs +++ b/Assets/Scripts/GameInit/UpdateManager.cs @@ -114,7 +114,7 @@ namespace GameLogic { void CreateUpdatePanel() { if (AppConst.bundleMode) { -#if PLATFORM_IOS +#if UNITY_IOS string updateFilePath = "lz4_updatepanel.unity3d"; #else string updateFilePath = "lz4/updatepanel.unity3d"; From 1ba37dce92c103a2689b3b33b8ead6fc6db9f514 Mon Sep 17 00:00:00 2001 From: JLIOSM1 <774727341@qq.com> Date: Tue, 13 Jul 2021 18:20:56 +0800 Subject: [PATCH 11/20] =?UTF-8?q?=E3=80=90IOS=E3=80=91=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E7=BF=BB=E8=AF=91=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Resources/{language.txt => Language.json} | 0 Assets/Resources/{language.txt.meta => Language.json.meta} | 2 +- Assets/Scripts/GameInit/SLanguageMoreLanguageMgr.cs | 4 ++-- 3 files changed, 3 insertions(+), 3 deletions(-) rename Assets/Resources/{language.txt => Language.json} (100%) rename Assets/Resources/{language.txt.meta => Language.json.meta} (75%) diff --git a/Assets/Resources/language.txt b/Assets/Resources/Language.json similarity index 100% rename from Assets/Resources/language.txt rename to Assets/Resources/Language.json diff --git a/Assets/Resources/language.txt.meta b/Assets/Resources/Language.json.meta similarity index 75% rename from Assets/Resources/language.txt.meta rename to Assets/Resources/Language.json.meta index 1b41838979..97b599f897 100644 --- a/Assets/Resources/language.txt.meta +++ b/Assets/Resources/Language.json.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 2da61b816f9280346b8ee1f5ab41c5d9 +guid: 11ce2c571a0d245c99e09352a3ae99dd TextScriptImporter: externalObjects: {} userData: diff --git a/Assets/Scripts/GameInit/SLanguageMoreLanguageMgr.cs b/Assets/Scripts/GameInit/SLanguageMoreLanguageMgr.cs index ec9b8272e3..953d7ba6fa 100644 --- a/Assets/Scripts/GameInit/SLanguageMoreLanguageMgr.cs +++ b/Assets/Scripts/GameInit/SLanguageMoreLanguageMgr.cs @@ -93,7 +93,7 @@ namespace GameLogic /// /// 版本号文件 /// - const string languageFilePath = "language"; + const string languageFilePath = "Language"; /// /// 版本文件路径 /// @@ -101,7 +101,7 @@ namespace GameLogic { get { - return AppConst.PersistentDataPath + languageFilePath + ".txt"; + return AppConst.PersistentDataPath + languageFilePath + ".json"; } } public class languageStruct From 5b311e2ac8692173bbfb522aa7da4f6c804dacd8 Mon Sep 17 00:00:00 2001 From: JLIOSM1 <774727341@qq.com> Date: Tue, 13 Jul 2021 18:24:33 +0800 Subject: [PATCH 12/20] =?UTF-8?q?=E3=80=90http=E3=80=91=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E5=8A=A0=E5=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ManagedResources/~Lua/Base/HttpCrypt.lua | 55 +++++++++++++++++++ .../~Lua/Base/HttpCrypt.lua.meta | 7 +++ .../~Lua/Modules/Battle/BattleManager.lua | 4 +- .../BindPhone/BindPhoneNumberManager.lua | 2 +- .../~Lua/Modules/Login/LoginManager.lua | 28 +++++++++- .../~Lua/Modules/Login/LoginPanel.lua | 8 +-- 6 files changed, 94 insertions(+), 10 deletions(-) create mode 100755 Assets/ManagedResources/~Lua/Base/HttpCrypt.lua create mode 100644 Assets/ManagedResources/~Lua/Base/HttpCrypt.lua.meta diff --git a/Assets/ManagedResources/~Lua/Base/HttpCrypt.lua b/Assets/ManagedResources/~Lua/Base/HttpCrypt.lua new file mode 100755 index 0000000000..f88ed43960 --- /dev/null +++ b/Assets/ManagedResources/~Lua/Base/HttpCrypt.lua @@ -0,0 +1,55 @@ +-- 对字符串进行加密解密 + +require "Common.BitMath" +function strSplit(input, delimiter) + input = tostring(input) + delimiter = tostring(delimiter) + if (delimiter=='') then return false end + local pos,arr = 0, {} + for st,sp in function() return string.find(input, delimiter, pos, true) end do + table.insert(arr, string.sub(input, pos, st - 1)) + pos = sp + 1 + end + table.insert(arr, string.sub(input, pos)) + return arr +end + +function StrToBytes(s) + local t={} + for i=1,string.len(s) do + table.insert(t,string.byte(string.sub(s,i,i))) + end + return t +end + +function HTTP_ENCRYPT(src, key) + local data = StrToBytes(src) + local keys = StrToBytes(key) + local sb = "" + for i = 1, #data do + local n = BitMath.andOp(255, data[i]) + BitMath.andOp(255, keys[(i - 1) % #keys + 1]) + sb = sb.."@"..n + end + return sb +end + +function HTTP_DECRYPT(src, key) + local list = strSplit(src, "@") + if not list or #list < 1 then + return src + end + table.remove(list, 1) + local keys = StrToBytes(key) + local data = "" + for i = 1, #list do + local n = list[i] - BitMath.andOp(255, keys[(i - 1) % #keys + 1]) + data = data .. string.char(n) + end + return data +end + + +-- local t = HTTP_ENCRYPT("fajkfkahsdfjkhkashd", "123") +-- print(t) +-- local data = HTTP_DECRYPT(t, "123") +-- print(data) \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/Base/HttpCrypt.lua.meta b/Assets/ManagedResources/~Lua/Base/HttpCrypt.lua.meta new file mode 100644 index 0000000000..fa031a928d --- /dev/null +++ b/Assets/ManagedResources/~Lua/Base/HttpCrypt.lua.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c0a2e12bba84144f48f8b9b64c1e89c4 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua b/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua index 19eb9996d9..525613d459 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua @@ -1,4 +1,4 @@ -BattleManager = {} +BattleManager = {} local this = BattleManager local PassiveSkillLogicConfig = ConfigManager.GetConfig(ConfigName.PassiveSkillLogicConfig) local SkillLogicConfig = ConfigManager.GetConfig(ConfigName.SkillLogicConfig) @@ -1014,7 +1014,7 @@ function this.RequestBattleDataByFightId(serverUrl, fightId, func) local uid = string.split(fightId, "_")[1] local requestUrl = string.format("http://%s/req/getFightRecord?uid=%s&fightid=%s", serverUrl, uid, fightId) LogGreen(requestUrl) - networkMgr:SendGetHttp(requestUrl, function(str) + LoginManager:SendGetHttp(requestUrl, function(str) --LogGreen(str) local json = require 'cjson' local data = json.decode(str) diff --git a/Assets/ManagedResources/~Lua/Modules/BindPhone/BindPhoneNumberManager.lua b/Assets/ManagedResources/~Lua/Modules/BindPhone/BindPhoneNumberManager.lua index 691aaec793..55a5516b9f 100644 --- a/Assets/ManagedResources/~Lua/Modules/BindPhone/BindPhoneNumberManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/BindPhone/BindPhoneNumberManager.lua @@ -61,7 +61,7 @@ function this.DOGetBindPhone(type, phoneNumber, code) local sign = Util.MD5Encrypt(string.format("%s%s%s%s%s%s", pid, gid, type, phoneNumber, time, signKey)) local code = code and code or "" - networkMgr:SendGetHttp(string.format("%s?pid=%s&gid=%s&token=%s&type=%s&phone=%s&code=%s&time=%s&sign=%s", + LoginManager:SendGetHttp(string.format("%s?pid=%s&gid=%s&token=%s&type=%s&phone=%s&code=%s&time=%s&sign=%s", GetBindUrl, pid, gid, token, type, phoneNumber, code, time, sign), this.OnCodeResult, nil, nil, nil) end diff --git a/Assets/ManagedResources/~Lua/Modules/Login/LoginManager.lua b/Assets/ManagedResources/~Lua/Modules/Login/LoginManager.lua index 93d439872b..a543ea702d 100644 --- a/Assets/ManagedResources/~Lua/Modules/Login/LoginManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Login/LoginManager.lua @@ -1,4 +1,4 @@ -LoginManager = {}; +LoginManager = {}; local this = LoginManager this.sign = "d13b3e8ef74bf72d8aafce3a1c8672a0" this.openId = nil @@ -124,7 +124,7 @@ function this.RequestRegist(name, pw, call) pw, this.sign)) RequestPanel.Show(Language[11132]) - networkMgr:SendGetHttp(LoginRoot_Url .. "jl_loginserver/registerUser?userName=".. name .. "&password=".. pw .."&repeat=".. pw .. "&sign=" .. sign, + this:SendGetHttp(LoginRoot_Url .. "jl_loginserver/registerUser?userName=".. name .. "&password=".. pw .."&repeat=".. pw .. "&sign=" .. sign, function(str) RequestPanel.Hide() if str == nil then @@ -150,7 +150,7 @@ function this.RequestUser(name, pw, call) pw, this.sign)) RequestPanel.Show(Language[11134]) - networkMgr:SendGetHttp(LoginRoot_Url .. "jl_loginserver/userLogin?userName=".. name .. "&password=".. pw .. "&sign=" .. sign, function(str) + this:SendGetHttp(LoginRoot_Url .. "jl_loginserver/userLogin?userName=".. name .. "&password=".. pw .. "&sign=" .. sign, function(str) RequestPanel.Hide() if str == nil then return @@ -179,6 +179,28 @@ function this.RequestUser(name, pw, call) end,nil,nil,nil) end +require("Base.HttpCrypt") +local CRYPT_KEY = "d53b3e8ef74bf72d8aafce3a1c8671a0" +function this:SendGetHttp(url, callback) + local request = url + LogGreen("Http请求:"..request) + if AppConst.Platform == "IOS" then + local urlList = string.split(url, "?") + urlList[2] = HTTP_ENCRYPT(urlList[2], CRYPT_KEY) + request = urlList[1] .. "?crypt=" .. urlList[2] + LogGreen("Http加密请求:"..request) + end + networkMgr:SendGetHttp(request, function(msg) + LogGreen("Http请求结果:"..msg) + if AppConst.Platform == "IOS" then + msg = HTTP_DECRYPT(msg, CRYPT_KEY) + LogGreen("Http请求结果解密:"..msg) + end + if callback then + callback(msg) + end + end, nil, nil, nil) +end return this \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua b/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua index e0fab0095a..8d46ccf1e9 100644 --- a/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua @@ -1,4 +1,4 @@ -require("Base/BasePanel") +require("Base/BasePanel") LoginPanel = Inherit(BasePanel) local this = LoginPanel @@ -281,7 +281,7 @@ function this.ShowNotice() if subNoticeID then LoginRoot_NoticeChannel = LoginRoot_NoticeChannel.. subNoticeID end - networkMgr:SendGetHttp(LoginRoot_Url .. "jl_loginserver/getNotice?timestamp="..timeStamp.."&sign=".. timeSign.."&packageName="..LoginRoot_NoticeChannel,function (str) + LoginManager:SendGetHttp(LoginRoot_Url .. "jl_loginserver/getNotice?timestamp="..timeStamp.."&sign=".. timeSign.."&packageName="..LoginRoot_NoticeChannel,function (str) UIManager.OpenPanel(UIName.NoticePopup,str) end, nil, nil, nil) end @@ -293,7 +293,7 @@ function this.RequestServerList(userId, callback) "%sjl_loginserver/getServerList?openId=%s&channel=%s&plat=android&sub_channel=%s&server_version=%s", LoginRoot_Url, userId, LoginRoot_Channel, LoginRoot_SubChannel, ServerVersion) Log(url) - networkMgr:SendGetHttp(url, callback, nil, nil, nil) + LoginManager:SendGetHttp(url, callback, nil, nil, nil) end @@ -646,7 +646,7 @@ function this.RequestHttpLogin() end Log(url) - networkMgr:SendGetHttp(url, this.OnReceiveLogin, nil, nil, nil) + LoginManager:SendGetHttp(url, this.OnReceiveLogin, nil, nil, nil) end --用户id登录 From d94dd117e4e5900e4dfa6ccb823e5050554f6fca Mon Sep 17 00:00:00 2001 From: JLIOSM1 <774727341@qq.com> Date: Tue, 13 Jul 2021 18:28:00 +0800 Subject: [PATCH 13/20] =?UTF-8?q?=E3=80=90=E5=9C=BA=E6=99=AF=E3=80=91?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=9B=BD=E5=86=85=E6=AD=A3=E5=BC=8F=E6=9C=8D?= =?UTF-8?q?=E6=89=93=E5=8C=85=E5=9C=BA=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/LuaFramework/Scenes/LogoChinaIOS.unity | 362 ++++++++++++++++++ .../Scenes/LogoChinaIOS.unity.meta | 8 + 2 files changed, 370 insertions(+) create mode 100644 Assets/LuaFramework/Scenes/LogoChinaIOS.unity create mode 100644 Assets/LuaFramework/Scenes/LogoChinaIOS.unity.meta diff --git a/Assets/LuaFramework/Scenes/LogoChinaIOS.unity b/Assets/LuaFramework/Scenes/LogoChinaIOS.unity new file mode 100644 index 0000000000..04af032248 --- /dev/null +++ b/Assets/LuaFramework/Scenes/LogoChinaIOS.unity @@ -0,0 +1,362 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!1 &2 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 16} + - component: {fileID: 42} + - component: {fileID: 44} + - component: {fileID: 43} + - component: {fileID: 5} + - component: {fileID: 3} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &3 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c7cbe2940276bfc4f946d442c07229d2, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!81 &5 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2} + m_Enabled: 1 +--- !u!4 &16 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!104 &22 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &24 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 10 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!114 &42 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 50 +--- !u!114 &43 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1997211142, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ForceModuleActive: 0 +--- !u!114 &44 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!1 &1013149005 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1013149006} + - component: {fileID: 1013149007} + - component: {fileID: 1013149008} + m_Layer: 0 + m_Name: GameStart + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1013149006 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1013149005} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.26726648, y: 0.43754014, z: -0.046788022} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1013149007 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1013149005} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ae34f89576e17114c97f3cb81dba9ff6, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1013149008 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1013149005} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fa01058878b41024abbd731e7118c543, type: 3} + m_Name: + m_EditorClassIdentifier: + settingInfo: + logLevel: 6 + isDebug: 0 + bundleMode: 1 + luaBundleMode: 1 + isUpdate: 1 + isSDK: 1 + isSDKLogin: 1 + isGuide: 1 + isOpenGM: 0 +--- !u!4 &57277738265262265 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3471622135844523394} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1362306110787991495 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3471622135844523394} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d7df5c5e5307f460e917e72bf75ec567, type: 3} + m_Name: + m_EditorClassIdentifier: + enableLog: 0 + networkType: 3 + tokens: + - appid: 63bdff7d90ca4720b6b6626841f0aad8 + serverUrl: https://thinkingdata.18183g.com + mode: 0 + timeZone: 0 + timeZoneId: +--- !u!1 &3471622135844523394 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 57277738265262265} + - component: {fileID: 1362306110787991495} + - component: {fileID: 3471622135844523395} + - component: {fileID: 3471622135844523396} + m_Layer: 0 + m_Name: SDKConfig + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &3471622135844523395 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3471622135844523394} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 54b4453692b964811aa1c221fd236d88, type: 3} + m_Name: + m_EditorClassIdentifier: + appid: wjtsq7xrwb48t2uw + channel: "TCX-\u56FD\u5185-IOS" +--- !u!114 &3471622135844523396 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3471622135844523394} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d7bc9cc33d9f7284590ba57b9743fb33, type: 3} + m_Name: + m_EditorClassIdentifier: + appid: 22f3fae585 diff --git a/Assets/LuaFramework/Scenes/LogoChinaIOS.unity.meta b/Assets/LuaFramework/Scenes/LogoChinaIOS.unity.meta new file mode 100644 index 0000000000..a24a47335d --- /dev/null +++ b/Assets/LuaFramework/Scenes/LogoChinaIOS.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3f10e499239d9486a889e1e5e1eb4258 +timeCreated: 1496386600 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: From 11f72d4e73512c7715bcc402ed3ca63ac3d48963 Mon Sep 17 00:00:00 2001 From: JLIOSM1 <774727341@qq.com> Date: Tue, 13 Jul 2021 18:56:21 +0800 Subject: [PATCH 14/20] =?UTF-8?q?=E3=80=90http=E3=80=91=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=A4=B1=E8=B4=A5=E5=9B=9E=E8=B0=83=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/ManagedResources/~Lua/Modules/Login/LoginManager.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Login/LoginManager.lua b/Assets/ManagedResources/~Lua/Modules/Login/LoginManager.lua index a543ea702d..d5e60749fb 100644 --- a/Assets/ManagedResources/~Lua/Modules/Login/LoginManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Login/LoginManager.lua @@ -181,7 +181,7 @@ end require("Base.HttpCrypt") local CRYPT_KEY = "d53b3e8ef74bf72d8aafce3a1c8671a0" -function this:SendGetHttp(url, callback) +function this:SendGetHttp(url, callback, _, _, failCB) local request = url LogGreen("Http请求:"..request) if AppConst.Platform == "IOS" then @@ -199,7 +199,7 @@ function this:SendGetHttp(url, callback) if callback then callback(msg) end - end, nil, nil, nil) + end, nil, nil, failCB) end From 3ca8ee52595ab5cb01a6ea4630237665ede4390f Mon Sep 17 00:00:00 2001 From: JLIOSM1 <774727341@qq.com> Date: Thu, 15 Jul 2021 23:04:07 +0800 Subject: [PATCH 15/20] =?UTF-8?q?=E3=80=90=E5=BC=95=E5=AF=BC=E3=80=91?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=B0=E6=89=8B=E5=BC=95=E5=AF=BC=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E7=95=8C=E9=9D=A2=E5=AF=BC=E8=87=B4=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E9=94=80=E6=AF=81=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/ManagedResources/~Lua/Modules/Guide/GuidePanel.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/Assets/ManagedResources/~Lua/Modules/Guide/GuidePanel.lua b/Assets/ManagedResources/~Lua/Modules/Guide/GuidePanel.lua index fffadecb1a..73e83e0112 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guide/GuidePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guide/GuidePanel.lua @@ -437,6 +437,7 @@ function this.ExecuteBehavior(beType, beArgs) params[i] = s end end + UIManager.CloseAllStack(true) -- 先跳转引导 this.NextGuide() -- 在跳转界面 From d2dd9401f4a0a310b558f13079af86c6ff9f9dc1 Mon Sep 17 00:00:00 2001 From: JLIOSM1 <774727341@qq.com> Date: Thu, 15 Jul 2021 23:04:59 +0800 Subject: [PATCH 16/20] =?UTF-8?q?=E3=80=90=E7=99=BB=E5=BD=95=E3=80=91?= =?UTF-8?q?=E6=8F=90=E5=AE=A1=E6=9C=8D=E4=B8=8D=E5=86=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=85=AC=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua b/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua index 4f8f9fb28b..93e46af1e4 100644 --- a/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua @@ -305,7 +305,7 @@ end function this.CheckNoticeShow() -- 判断公告显示 - IsShowNotice = true--SERVER_VERSION == 0 -- 正式服显示公告 + IsShowNotice = SERVER_VERSION == 0 -- 正式服显示公告 this.btnNotice:SetActive(IsShowNotice) end -- 打开公告界面 From 808efb676445d81f07873e652e8b509392314a8c Mon Sep 17 00:00:00 2001 From: JLIOSM1 <774727341@qq.com> Date: Thu, 15 Jul 2021 23:08:41 +0800 Subject: [PATCH 17/20] =?UTF-8?q?=E3=80=90=E5=BB=B6=E9=95=BF=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E7=95=8C=E9=9D=A2=E7=9A=84=E6=89=93=E5=BC=80=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/ManagedResources/~Lua/Logic/Game.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/ManagedResources/~Lua/Logic/Game.lua b/Assets/ManagedResources/~Lua/Logic/Game.lua index f94e8cd20a..94b40f27fb 100644 --- a/Assets/ManagedResources/~Lua/Logic/Game.lua +++ b/Assets/ManagedResources/~Lua/Logic/Game.lua @@ -21,7 +21,7 @@ function Game.Initialize() Timer.New(function() UIManager.OpenPanel(UIName.LoginPanel) UIManager.OpenPanel(UIName.HorseRaceLampView) - end, 0.1):Start() + end, 0.5):Start() end --初始化管理器 From 8f272916c56db30db50be2ee65c8171e51d39151 Mon Sep 17 00:00:00 2001 From: JLIOSM1 <774727341@qq.com> Date: Thu, 15 Jul 2021 23:09:33 +0800 Subject: [PATCH 18/20] =?UTF-8?q?=E3=80=90=E8=B5=84=E6=BA=90=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E3=80=91IOS=E8=B5=84=E6=BA=90=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=89=8D=E7=BC=80=EF=BC=9Afile://?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ResourcesMgr/Manager/ResourcesManager.cs | 17 +++++++++++++---- Assets/Scripts/GameInit/UpdatePanel.cs | 16 ++++++++++++---- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/Assets/Scripts/Core/ResMgr/ResourcesMgr/Manager/ResourcesManager.cs b/Assets/Scripts/Core/ResMgr/ResourcesMgr/Manager/ResourcesManager.cs index 08da6b6dda..88179a3d34 100644 --- a/Assets/Scripts/Core/ResMgr/ResourcesMgr/Manager/ResourcesManager.cs +++ b/Assets/Scripts/Core/ResMgr/ResourcesMgr/Manager/ResourcesManager.cs @@ -131,8 +131,13 @@ namespace ResMgr { } public IEnumerator LoadTextureFromStream(string name, LuaFunction luaFunction) { - XDebug.Log.l(Application.streamingAssetsPath + "/Res/" + name + ".png"); - UnityWebRequest www = UnityWebRequestTexture.GetTexture(Application.streamingAssetsPath + "/Res/"+ name + ".png"); + + string filePath = Application.streamingAssetsPath + "/Res/" + name + ".png"; +#if UNITY_IOS + filePath = "file://" + filePath; +#endif + XDebug.Log.l(filePath); + UnityWebRequest www = UnityWebRequestTexture.GetTexture(filePath); yield return www.SendWebRequest(); if (www.isNetworkError || www.isHttpError) { @@ -158,8 +163,12 @@ namespace ResMgr { } public IEnumerator LoadTextFromStream(string name, LuaFunction luaFunction) { - XDebug.Log.l(Application.streamingAssetsPath + "/Res/" + name + ".txt"); - UnityWebRequest www = UnityWebRequest.Get(Application.streamingAssetsPath + "/Res/" + name + ".txt"); + string filePath = Application.streamingAssetsPath + "/Res/" + name + ".txt"; +#if UNITY_IOS + filePath = "file://" + filePath; +#endif + XDebug.Log.l(filePath); + UnityWebRequest www = UnityWebRequest.Get(filePath); yield return www.SendWebRequest(); if (www.isNetworkError || www.isHttpError) { diff --git a/Assets/Scripts/GameInit/UpdatePanel.cs b/Assets/Scripts/GameInit/UpdatePanel.cs index 7129833351..5318239c5e 100644 --- a/Assets/Scripts/GameInit/UpdatePanel.cs +++ b/Assets/Scripts/GameInit/UpdatePanel.cs @@ -39,8 +39,13 @@ namespace GameLogic public IEnumerator LoadFromStream(Action act) { - XDebug.Log.l(Application.streamingAssetsPath + "/Res/PackConfig.txt"); - UnityWebRequest uwr = UnityWebRequest.Get(Application.streamingAssetsPath + "/Res/PackConfig.txt"); + + string filePath = Application.streamingAssetsPath + "/Res/PackConfig.txt"; +#if UNITY_IOS + filePath = "file://" + filePath; +#endif + XDebug.Log.l(filePath); + UnityWebRequest uwr = UnityWebRequest.Get(filePath); yield return uwr.SendWebRequest(); if (uwr.isNetworkError || uwr.isHttpError) { @@ -54,8 +59,11 @@ namespace GameLogic { Hashtable table = MiniJSON.jsonDecode(uwr.downloadHandler.text) as Hashtable; string bgName = table["UpdatePanelBG"] as string; - - UnityWebRequest www = UnityWebRequestTexture.GetTexture(Application.streamingAssetsPath + "/Res/" + bgName + ".png"); + string texPath = Application.streamingAssetsPath + "/Res/" + bgName + ".png"; +#if UNITY_IOS + texPath = "file://" + texPath; +#endif + UnityWebRequest www = UnityWebRequestTexture.GetTexture(texPath); yield return www.SendWebRequest(); if (www.isNetworkError || www.isHttpError) { From 7285c52be15b624fb9a70f1bb7b02142557b4442 Mon Sep 17 00:00:00 2001 From: JLIOSM1 <774727341@qq.com> Date: Thu, 15 Jul 2021 23:09:58 +0800 Subject: [PATCH 19/20] =?UTF-8?q?=E3=80=90IOS=E3=80=91=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=89=93=E5=BC=80=E7=BD=91=E9=A1=B5=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/LuaFramework/Scripts/SDK/Proxy/iOSProxy.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Assets/LuaFramework/Scripts/SDK/Proxy/iOSProxy.cs b/Assets/LuaFramework/Scripts/SDK/Proxy/iOSProxy.cs index ced50d9cf2..fc7ac111a6 100644 --- a/Assets/LuaFramework/Scripts/SDK/Proxy/iOSProxy.cs +++ b/Assets/LuaFramework/Scripts/SDK/Proxy/iOSProxy.cs @@ -78,6 +78,12 @@ namespace SDK public override void NewRoleTutorial(string eventName, string guide_start_time, string guide_end_time, string serverId, string serverName, string roleName, string roleId) { } + + [DllImport("__Internal")] + private static extern void m_SDK_OpenWeb(string url); + public override void OpenWeb(string url) { + m_SDK_OpenWeb(url); + } } } #endif From 56e7492a91bcbb13e06384589f611e96a2c15baa Mon Sep 17 00:00:00 2001 From: JLIOSM1 <774727341@qq.com> Date: Fri, 16 Jul 2021 15:37:48 +0800 Subject: [PATCH 20/20] =?UTF-8?q?=E3=80=90=E5=95=86=E5=BA=97=E3=80=91?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A6=96=E7=B2=BE=E5=95=86=E5=BA=97=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E5=9B=9E=E6=94=B6=E5=AF=BC=E8=87=B4=E7=99=BD=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/ManagedResources/~Lua/View/ShopView.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Assets/ManagedResources/~Lua/View/ShopView.lua b/Assets/ManagedResources/~Lua/View/ShopView.lua index 66e913a8f8..41d2344d46 100644 --- a/Assets/ManagedResources/~Lua/View/ShopView.lua +++ b/Assets/ManagedResources/~Lua/View/ShopView.lua @@ -1,4 +1,4 @@ - + local _ShopTypeConfig = ConfigManager.GetConfig(ConfigName.StoreTypeConfig) -- 通用得商店逻辑 local ShopView = {} @@ -16,7 +16,7 @@ function this:New(gameObject) end --初始化组件(用于子类重写) function this:InitComponent() - this.spLoader = SpriteLoader.New() + self.spLoader = SpriteLoader.New() self.live = Util.GetGameObject(self.gameObject, "live") self.liveRoot = Util.GetGameObject(self.gameObject, "live/root") self.liveImg = Util.GetGameObject(self.gameObject, "live/img") @@ -359,7 +359,7 @@ function this:RefreshBase() -- 刷新物品计算 local shopInfo = ShopManager.GetShopInfoByType(self.ShopType) local costId, abcd = shopInfo.RefreshItem[1][1], shopInfo.RefreshItem[2] - self.costIcon:GetComponent("Image").sprite = SetIcon(this.spLoader, costId) + self.costIcon:GetComponent("Image").sprite = SetIcon(self.spLoader, costId) -- 商店特权正确性检测 if not shopInfo.RefreshPrivilege or shopInfo.RefreshPrivilege == 0 then Log("错误:商店类型 == " .. self.ShopType .. "商店支持手动刷新,但是未配置刷新次数对应的特权id(无限制次数也需要配置特权id)请检查") @@ -373,7 +373,7 @@ function this:RefreshBase() -- 商店标题 if self.ShopConfig.Title and self.ShopConfig.Title ~= "" then - self.titleImg:GetComponent("Image").sprite = this.spLoader:LoadSprite(self.ShopConfig.Title) + self.titleImg:GetComponent("Image").sprite = self.spLoader:LoadSprite(self.ShopConfig.Title) end -- 对话显示 @@ -467,17 +467,17 @@ function this:ShopItemAdapter(shopItem, itemData) -- 折扣 if price == 0 then discountbg:SetActive(true) - discountbg:GetComponent("Image").sprite = this.spLoader:LoadSprite("s_shop_zhekou_00_zh") + discountbg:GetComponent("Image").sprite = self.spLoader:LoadSprite("s_shop_zhekou_00_zh") else local isDiscount = itemInfo.IsDiscount == 1 discountbg:SetActive(isDiscount) if isDiscount then - discountbg:GetComponent("Image").sprite = this.spLoader:LoadSprite("s_shop_zhekou_0" .. itemInfo.DiscountDegree.."_zh") + discountbg:GetComponent("Image").sprite = self.spLoader:LoadSprite("s_shop_zhekou_0" .. itemInfo.DiscountDegree.."_zh") end end -- 消耗物品的信息 itemPrice.text = PrintWanNum2(tonumber(price))--tostring(price) - costIcon.sprite = SetIcon(this.spLoader, costId) + costIcon.sprite = SetIcon(self.spLoader, costId) -- 判断商品栏位是否解锁 local _IsUnLock = true @@ -571,7 +571,7 @@ function this:RechargeShopItemAdapter(shopItem, itemData) -- 计算数据 local itemInfo = ShopManager.GetRechargeItemInfo(itemData.goodsId) - icon.sprite = this.spLoader:LoadSprite(GetResourcePath(itemInfo.Resources)) + icon.sprite = self.spLoader:LoadSprite(GetResourcePath(itemInfo.Resources)) num.text = itemInfo.BaseReward[1][2] price.text = MoneyUtil.GetMoneyUnitNameWithMoney(itemInfo.Price) --.. MoneyUtil.GetMoney(itemInfo.Price)