From ec916ef6f0a5f995fa2915bf10ea2f5012c966ba Mon Sep 17 00:00:00 2001 From: gaoxin Date: Mon, 13 Dec 2021 17:07:31 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E3=80=90=E5=BC=95=E5=AF=BC=E6=88=98?= =?UTF-8?q?=E6=96=97=E3=80=91=E4=BF=AE=E5=A4=8Dcasting=E5=B1=82=E7=BA=A7?= =?UTF-8?q?=E9=94=99=E8=AF=AF=EF=BC=8C=E4=BF=AE=E5=A4=8D=E7=94=B7=E5=A5=B3?= =?UTF-8?q?=E8=A7=92=E8=89=B2=E6=98=BE=E7=A4=BA=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Battle/View/GuideBattlePanel.lua | 1 + .../Modules/Battle/View/Unit/MonsterView.lua | 7 +++- .../Modules/Battle/View/Unit/PlayerView.lua | 36 ++++++++++++------- 3 files changed, 30 insertions(+), 14 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattlePanel.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattlePanel.lua index 91bb6d728e..84b224df12 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattlePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattlePanel.lua @@ -15,6 +15,7 @@ local orginLayer --初始化组件(用于子类重写) function this:InitComponent() this.spLoader = SpriteLoader.New() + BattleView.oSortingOrder = nil BattleView:InitComponent(self, self.gameObject) orginLayer = 0 diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/MonsterView.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/MonsterView.lua index 3b24935098..60434820bc 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/MonsterView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/MonsterView.lua @@ -249,7 +249,12 @@ function MonsterView:OnSkillCastingStart(skill) else self.RoleLiveGO3.transform:DORotate(Vector3.New(0,0, 0),0.5) end - self.castingNameNode:GetComponent("Image").sprite = self.spLoader:LoadSprite(self.combat.skillname) + if self.combat.skillname then + self.castingNameNode:SetActive(true) + self.castingNameNode:GetComponent("Image").sprite = self.spLoader:LoadSprite(self.combat.skillname) + else + self.castingNameNode:SetActive(false) + end self:PlaySpineAnim(self.RoleLiveGOGraphic3, 0, "attack" , false) -- coroutine.wait(1.5) --self.turnEffect:SetActive(false) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/PlayerView.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/PlayerView.lua index 9bb4289c61..92b617b627 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/PlayerView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/PlayerView.lua @@ -44,22 +44,32 @@ function PlayerView:onCreate(go, role, position, root) self.hpPassSlider.fillAmount = self.hpCache self.yujiaSlider.fillAmount = 0 local roleId=role.roleData.roleId - local live=HeroConfig[role.roleData.roleId].Live - -- 判断是否有皮肤 - if not role.roleData.skinId or role.roleData.skinId == 0 then + -- 身外化身引导立绘展示处理 + if roleId == 21061 then self.skinId = 0 - else - self.skinId = role.roleData.skinId - end - --如果英雄装备皮肤 - if self.skinId and self.skinId > 0 then - roleId = self.skinId - local skin = ConfigManager.GetConfigDataByKey(ConfigName.HeroSkin,"Type",roleId) - if skin then - live = skin.Live + if NameManager.roleSex == ROLE_SEX.BOY then + self.livePath = "live2d_npc_boy" + else + self.livePath = "live2d_npc_girl" end + else + local live=HeroConfig[role.roleData.roleId].Live + -- 判断是否有皮肤 + if not role.roleData.skinId or role.roleData.skinId == 0 then + self.skinId = 0 + else + self.skinId = role.roleData.skinId + end + --如果英雄装备皮肤 + if self.skinId and self.skinId > 0 then + roleId = self.skinId + local skin = ConfigManager.GetConfigDataByKey(ConfigName.HeroSkin,"Type",roleId) + if skin then + live = skin.Live + end + end + self.livePath = GetResourcePath(live) end - self.livePath = GetResourcePath(live) self.play_liveScale = RoleConfig[roleId].play_liveScale self.enemy_liveScale = RoleConfig[roleId].enemy_liveScale self.offset = RoleConfig[roleId].offset From c680ea094023581427bf2d5ff8bce31c819a7d44 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Mon, 13 Dec 2021 17:17:51 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E3=80=90=E6=88=98=E6=96=97=E8=B7=B3?= =?UTF-8?q?=E8=BF=87=E3=80=91=E8=B7=B3=E8=BF=87=E9=99=90=E5=88=B6=E5=8F=AA?= =?UTF-8?q?=E5=AF=B9=E5=85=B3=E5=8D=A1=E6=88=98=E6=96=97=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Battle/View/BattlePanel.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua index 5c425f5c30..aba3d51179 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua @@ -29,10 +29,10 @@ local SKIP_STATE = { } local UpdateBtnGMFunc = { [-1] = function() - local isUnlock, tip = BattleManager.IsUnlockBattlePass() - if not isUnlock then - return SKIP_STATE.LOCK, tip - end + -- local isUnlock, tip = BattleManager.IsUnlockBattlePass() + -- if not isUnlock then + -- return SKIP_STATE.LOCK, tip + -- end return SKIP_STATE.UNLOCK end, [BATTLE_TYPE.BACK]= function() From 759de1e7ecc29f2ce0e09e0a3711551cf31c4719 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Mon, 13 Dec 2021 17:19:02 +0800 Subject: [PATCH 3/3] =?UTF-8?q?[=E6=88=98=E6=96=97]=3D=3D=3D=3D=3D=3D?= =?UTF-8?q?=E4=B8=BB=E8=A7=92=E6=8A=80=E8=83=BD=E9=87=8A=E6=94=BE=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Battle/Logic/Monster/MonsterSkill/MTrigger.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Monster/MonsterSkill/MTrigger.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Monster/MonsterSkill/MTrigger.lua index 604f285101..f37437e13e 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Monster/MonsterSkill/MTrigger.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Monster/MonsterSkill/MTrigger.lua @@ -240,7 +240,11 @@ function this.InitListener() table.sort(firstList, function(a, b) -- 同阵营按位置排序 if a.owner.camp == b.owner.camp then - return a.owner.position < b.owner.position + if a.owner.position == b.owner.position then + return a.id < b.id + else + return a.owner.position < b.owner.position + end else -- 不同阵营的根据先手阵营排序 return a.owner.camp == BattleLogic.FirstCamp @@ -250,7 +254,11 @@ function this.InitListener() table.sort(sortList, function(a, b) -- 同阵营按位置排序 if a.owner.camp == b.owner.camp then - return a.owner.position < b.owner.position + if a.owner.position == b.owner.position then + return a.id < b.id + else + return a.owner.position < b.owner.position + end else -- 不同阵营的根据先手阵营排序 return a.owner.camp == BattleLogic.FirstCamp