Compare commits

...

2 Commits

1 changed files with 5 additions and 1 deletions

View File

@ -101,7 +101,11 @@ function SkillCaster:OnSkillCast(skill)
--LogError(tostring(Vector3.New(postion.x-(self.owner.camp==0 and posx or(-posx)),postion.y+posy,postion.z)))
LogError("===========================:"..self.owner.RoleLiveGO.name)
self.owner.RoleLiveGO.transform:DOMove(Vector3.New(postion.x-(self.owner.camp==0 and posx or(-posx)),postion.y+posy,startPos.z), combat.AttackDisplaceTime/1000, false):OnComplete(function ()
self.owner.RoleLiveGO.transform.parent.parent.gameObject:GetComponent("Canvas").sortingOrder= self.owner.RoleLiveGO.transform.parent.parent.gameObject:GetComponent("Canvas").sortingOrder+50
local Canvas = self.owner.RoleLiveGO.transform.parent.gameObject:GetComponent("Canvas")
if Canvas==nil then
Canvas = self.owner.RoleLiveGO.transform.parent.parent.gameObject:GetComponent("Canvas")
end
Canvas.sortingOrder= Canvas.sortingOrder+50
if self.owner.OnSkillPlay then
self.owner:OnSkillPlay(localtype,combat)
end