From fd81a89c96f5c631b9d5defd0811defd9d5ae376 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Sat, 27 Nov 2021 13:56:37 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=88=98=E6=96=97=E8=A1=A8=E7=8E=B0?= =?UTF-8?q?=E3=80=91=3D=3D=3D=3D=3D=3D=3D=3D=E5=8F=98=E8=BA=AB=E5=8D=A1?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E4=BD=8D=E7=BD=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Battle/View/Unit/MonsterView.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/MonsterView.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/MonsterView.lua index bf00163020..aa6e041554 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/MonsterView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/MonsterView.lua @@ -150,10 +150,12 @@ end function MonsterView:OnSkillCastStart(skill) -- self.RoleLiveGO:SetActive(true) local name=nil + local roleConfig=nil if skill and skill.id and skill.id~=0 then local aaa=SkillLogicConfig[skill.id].Hero if aaa and aaa~=0 then local liveId=ConfigManager.GetConfigData(ConfigName.HeroConfig,aaa).Live + roleConfig=ConfigManager.GetConfigData(ConfigName.RoleConfig,aaa) if liveId then name=ConfigManager.GetConfigData(ConfigName.ArtResourcesConfig,liveId).Name end @@ -169,12 +171,15 @@ function MonsterView:OnSkillCastStart(skill) end self.RoleLiveGO3.transform:SetParent(self.skillCastRoot.gameObject.transform) self.RoleLiveGO3.transform:SetSiblingIndex(0) - local offset = self.camp == 0 and self.offset or self.outOffset - self.RoleLiveGO3:GetComponent("RectTransform").anchoredPosition = Vector2.New(offset[1], offset[2]) + --self.RoleLiveGO3.transform.position=Vector3.zero + local offset = self.camp == 0 and SpiritAnimal[20100].offset or SpiritAnimal[20100].enemy_offset + local add=roleConfig.enemy_offset + self.RoleLiveGO3:GetComponent("RectTransform").anchoredPosition = Vector2.New(offset[1]+add[1], offset[2]+add[2]+180) if self.camp==1 then self.RoleLiveGO3.transform.rotation=Vector3.New(0,180,0) end - local scale = self.camp == 0 and self.play_liveScale or self.enemy_liveScale + local scale = roleConfig.enemy_liveScale + LogError("scale===="..scale) self.RoleLiveGO3.transform.localScale = Vector3.one * scale --* 2 self.RoleLiveGO3:SetActive(false) self.RoleLiveGOGraphic3 = self.RoleLiveGO3:GetComponent("SkeletonGraphic")