From ec916ef6f0a5f995fa2915bf10ea2f5012c966ba Mon Sep 17 00:00:00 2001 From: gaoxin Date: Mon, 13 Dec 2021 17:07:31 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=BC=95=E5=AF=BC=E6=88=98=E6=96=97?= =?UTF-8?q?=E3=80=91=E4=BF=AE=E5=A4=8Dcasting=E5=B1=82=E7=BA=A7=E9=94=99?= =?UTF-8?q?=E8=AF=AF=EF=BC=8C=E4=BF=AE=E5=A4=8D=E7=94=B7=E5=A5=B3=E8=A7=92?= =?UTF-8?q?=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