敌方英雄显示修改

ShaoNv
wangzhenxing 2024-08-21 19:31:26 +08:00
parent 66e79476a2
commit 707908f7c2
1 changed files with 14 additions and 7 deletions

View File

@ -137,13 +137,13 @@ function EnemyView:onCreate(go, role, position, root, isBoss,enemyId)
self.RoleSkillLiveGoTran2.localPosition = Vector2.New(0, 0)-- * 0.5 self.RoleSkillLiveGoTran2.localPosition = Vector2.New(0, 0)-- * 0.5
end end
self.RoleSkillLiveGoTran2.localScale = combat2.CloseRangeHitScale==nil and Vector3.one or Vector3.New( combat2.CloseRangeHitScale[1]/1000, combat2.CloseRangeHitScale[2]/1000,1) self.RoleSkillLiveGoTran2.localScale = self.combat2.CloseRangeHitScale==nil and Vector3.New(10,10,1) or Vector3.New( self.combat2.CloseRangeHitScale[1]/1000, self.combat2.CloseRangeHitScale[2]/1000,1)
self.RoleSkillLiveGoTran2.sizeDelta = Vector2.New(1000, 1000) self.RoleSkillLiveGoTran2.sizeDelta = Vector2.New(1000, 1000)
self.RoleSkillLiveGoGraphic2 = self.RoleSkillLiveGo2:GetComponent("SkeletonGraphic") self.RoleSkillLiveGoGraphic2 = self.RoleSkillLiveGo2:GetComponent("SkeletonGraphic")
self.RoleSkillLiveGoGraphic2.AnimationState.TimeScale=combat2.SkillTimeScale/1000 self.RoleSkillLiveGoGraphic2.AnimationState.TimeScale=combat2.SkillTimeScale/1000
-- local t= self.RoleLiveGOGraphic.SkeletonData.animations -- local t= self.RoleLiveGOGraphic.SkeletonData.animations
self.RoleSkillLiveGoGraphic2.AnimationState:SetAnimation(0, "idle", true) self.RoleSkillLiveGoGraphic2.AnimationState:SetAnimation(0, "play_skill_self", true)
self.RoleSkillLiveGo2:SetActive(true) self.RoleSkillLiveGo2:SetActive(false)
end end
-- casting技能立绘 -- casting技能立绘
self.RoleLiveGO2 = poolManager:LoadLive(self.livePath2, go.transform.parent, Vector3.one, Vector3.zero) self.RoleLiveGO2 = poolManager:LoadLive(self.livePath2, go.transform.parent, Vector3.one, Vector3.zero)
@ -469,7 +469,12 @@ function EnemyView:PlaySpineAnim(gog, time, name, isLoop)
local _complete = nil local _complete = nil
_complete = function(state) _complete = function(state)
gog.AnimationState.Complete = gog.AnimationState.Complete - _complete gog.AnimationState.Complete = gog.AnimationState.Complete - _complete
gog.AnimationState:SetAnimation(0, "idle", true) if endWith(gog.gameObject.name,"skill") then
gog.gameObject:SetActive(false)
else
gog.AnimationState:SetAnimation(0, "idle", true)
end
self.currAniName="idle" self.currAniName="idle"
end end
gog.AnimationState:ClearTracks() -- 清除上一个动画的影响(修复概率攻击动画播放错误的问题) gog.AnimationState:ClearTracks() -- 清除上一个动画的影响(修复概率攻击动画播放错误的问题)
@ -496,9 +501,9 @@ function EnemyView:OnSkillPlay(type)
-- end -- end
local name="attack" local name="attack"
local humanname="attack" local humanname="atk"
if type and type==2 then if type and type==2 then
humanname="skill" humanname="skill2"
end end
self:PlaySpineAnim(self.RoleLiveGOGraphic, 0, humanname, false) self:PlaySpineAnim(self.RoleLiveGOGraphic, 0, humanname, false)
@ -507,7 +512,8 @@ function EnemyView:OnSkillPlay(type)
elseif self.RoleSkillLiveGoGraphic~=nil then elseif self.RoleSkillLiveGoGraphic~=nil then
-- name="skill" -- name="skill"
self:PlaySpineAnim(self.RoleSkillLiveGoGraphic2, 0, name, false) self.RoleSkillLiveGo2:SetActive(true)
self:PlaySpineAnim(self.RoleSkillLiveGoGraphic2, 0, "play_skill_self", false)
end end
end end
@ -830,6 +836,7 @@ function EnemyView:OnDead()
self.hpPassSlider.fillAmount = 0 self.hpPassSlider.fillAmount = 0
--死亡后不把怒气条显示清空,处理触发不灭怒气不足四点 怒气条清空 2021/09/01 --死亡后不把怒气条显示清空,处理触发不灭怒气不足四点 怒气条清空 2021/09/01
--self.rageSlider.fillAmount = 0 --self.rageSlider.fillAmount = 0
--self:PlaySpineAnim(self.RoleLiveGOGraphic, 0, "die", false)
self.rageText.text = "" self.rageText.text = ""
end end