龙珠我方战斗修改

ShaoNv
wangzhenxing 2024-06-12 18:20:57 +08:00
parent 6acde19593
commit 19ed504a36
2 changed files with 18 additions and 12 deletions

View File

@ -186,13 +186,14 @@ function PlayerView:onCreate(go, role, position, root)
else else
self.RoleSkillLiveGoTran2.localPosition = Vector2.New(0, 0)-- * 0.5 self.RoleSkillLiveGoTran2.localPosition = Vector2.New(0, 0)-- * 0.5
end end
self.RoleSkillLiveGoTran2.localScale = self.combat2.CloseRangeHitScale==nil and Vector3.one or Vector3.New( self.combat2.CloseRangeHitScale[1]/1000, self.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=self.combat2.SkillTimeScale/1000 self.RoleSkillLiveGoGraphic2.AnimationState.TimeScale=self.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
-- 卡牌立绘显示 -- 卡牌立绘显示
@ -529,7 +530,12 @@ function PlayerView:PlaySpineAnim(gog, time, name, isLoop)
_complete = function(state) _complete = function(state)
gog.AnimationState.Complete = gog.AnimationState.Complete - _complete gog.AnimationState.Complete = gog.AnimationState.Complete - _complete
self.currAniName="idle" self.currAniName="idle"
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
end end
gog.AnimationState:ClearTracks() -- 清除上一个动画的影响(修复概率攻击动画播放错误的问题) gog.AnimationState:ClearTracks() -- 清除上一个动画的影响(修复概率攻击动画播放错误的问题)
self.currAniName=name self.currAniName=name
@ -571,23 +577,23 @@ function PlayerView:OnSkillPlay(type,combat)
-- cardRenderMat:SetInt("_IsMask", 0) -- cardRenderMat:SetInt("_IsMask", 0)
-- if self.role.roleData.roleId==10016 then -- if self.role.roleData.roleId==10016 then
-- type=1 -- type=1
-- end -- end
local humanname="attack" local humanname="atk"
local name="attack" local name="attack"
if type ~=0 then if type ~=0 then
humanname="skill" humanname="skill2"
end end
self:PlaySpineAnim(self.RoleLiveGOGraphic, 0, humanname, false) self:PlaySpineAnim(self.RoleLiveGOGraphic, 0, humanname, false)
if type==0 and self.RoleSkillLiveGoGraphic ~= nil then if type==0 and self.RoleSkillLiveGoGraphic ~= nil then
self:PlaySpineAnim(self.RoleSkillLiveGoGraphic, 0, name, false) self:PlaySpineAnim(self.RoleSkillLiveGoGraphic, 0, "attack", false)
elseif self.RoleSkillLiveGoGraphic2~=nil and self.combat2.EffectType==8 then elseif self.RoleSkillLiveGoGraphic2~=nil and self.combat2.EffectType==8 then
-- name="skill" -- name="skill"
-- local offset=Vector3.New(self.combat2.Offset[1],self.combat2.Offset[2],0) -- local offset=Vector3.New(self.combat2.Offset[1],self.combat2.Offset[2],0)
self.RoleSkillLiveGo2:SetActive(true)
-- self.RoleSkillLiveGoGraphic2.gameObject.transform.localPosition=Vector3.New(self.combat2.Offset[1],self.combat2.Offset[2],0) -- self.RoleSkillLiveGoGraphic2.gameObject.transform.localPosition=Vector3.New(self.combat2.Offset[1],self.combat2.Offset[2],0)
self:PlaySpineAnim(self.RoleSkillLiveGoGraphic2, 0, name, false) self:PlaySpineAnim(self.RoleSkillLiveGoGraphic2, 0, "play_skill_self", false)
end end
@ -1054,7 +1060,7 @@ function PlayerView:OnDead()
self.yujiaSlider.fillAmount = 0 self.yujiaSlider.fillAmount = 0
--self.RoleLiveGO.gameObject:SetActive(false) --self.RoleLiveGO.gameObject:SetActive(false)
self.lvHpObj:SetActive(false) self.lvHpObj:SetActive(false)
self:PlaySpineAnim(self.RoleLiveGOGraphic, 0, "death", false) self:PlaySpineAnim(self.RoleLiveGOGraphic, 0, "die", false)
--死亡后不把怒气条显示清空,处理触发不灭怒气不足四点 怒气条清空 2021/09/01 --死亡后不把怒气条显示清空,处理触发不灭怒气不足四点 怒气条清空 2021/09/01
--self.rageSlider.fillAmount = 0 --self.rageSlider.fillAmount = 0
self.rageText.text = "" self.rageText.text = ""

View File

@ -554,7 +554,7 @@ function SkillCaster:CheckFullSceenSkill(combat, skill,skillduration)
if compnet~=nil then if compnet~=nil then
-- compnet.transform.localScale = Vector3.one * 3 -- compnet.transform.localScale = Vector3.one * 3
-- compnet.transform.sizeDelta = Vector2.New(1000, 1000) -- compnet.transform.sizeDelta = Vector2.New(1000, 1000)
self.owner:PlaySpineAnim (compnet,0,"attack",true) self.owner:PlaySpineAnim (compnet,0,"play_skill_self",true)
end end
BattleManager.AddDelayRecycleRes(combat.Bullet, go2, combat.BulletTime==0 and 4 or combat.BulletTime/1000) BattleManager.AddDelayRecycleRes(combat.Bullet, go2, combat.BulletTime==0 and 4 or combat.BulletTime/1000)
end end