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")