【战斗表现】========变身卡展示位置修改

dev_chengFeng
wangzhenxing 2021-11-27 13:56:37 +08:00
parent 767d4589c7
commit fd81a89c96
1 changed files with 8 additions and 3 deletions

View File

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