神将不能拖动修改

dev_chengFeng
jiaoyangna 2021-09-27 16:27:58 +08:00
parent 516ddb44ae
commit 9276097bf4
1 changed files with 12 additions and 0 deletions

View File

@ -404,6 +404,12 @@ function HeroLikeAbilityPanel:RightBtnOnClick()
self.rightLiveObj = HeroManager.LoadHerolive1(rightHeroData,self.rightObj)
local SkeletonGraphic = self.curLiveObj:GetComponent("SkeletonGraphic")
SkeletonGraphic.AnimationState:SetAnimation(0, "touch", false)
if self.curLiveObj then
self.dragView.gameObject:SetActive(true)
self.dragView:SetDragGO(self.curLiveObj)
else
self.dragView.gameObject:SetActive(false)
end
self:UpdateHeroInfoData()
self.isRightOrLeft = true
end):SetEase(Ease.Linear)
@ -446,6 +452,12 @@ function HeroLikeAbilityPanel:LeftBtnOnClick()
self.leftLiveObj = HeroManager.LoadHerolive1(leftHeroData,self.leftObj)
local SkeletonGraphic = self.curLiveObj:GetComponent("SkeletonGraphic")
SkeletonGraphic.AnimationState:SetAnimation(0, "touch", false)
if self.curLiveObj then
self.dragView.gameObject:SetActive(true)
self.dragView:SetDragGO(self.curLiveObj)
else
self.dragView.gameObject:SetActive(false)
end
self:UpdateHeroInfoData()
self.isRightOrLeft = true
end):SetEase(Ease.Linear)