[战斗]===============报空判断修改

onepiece_demo_arena
wangzhenxing 2023-12-31 15:56:45 +08:00
parent 5316c03eee
commit e7abac49ce
2 changed files with 24 additions and 19 deletions

View File

@ -36,7 +36,7 @@ function MonsterView:onCreate(go, role, position, root)
end
if role.roleData.id == 20100 then
if role.sex == ROLE_SEX.BOY then
self.livePath = "live2d_caomaolufei"
self.livePath = "live2d_caomaolufeizhanshi"
else
self.livePath = "live2d_namei"
end
@ -75,7 +75,7 @@ function MonsterView:onCreate(go, role, position, root)
self.RoleLiveGOTran = self.RoleLiveGO:GetComponent("RectTransform")
self.RoleLiveGOGraphic.AnimationState:SetAnimation(0, "idle", true)
self.RoleLiveGOTran.sizeDelta = Vector2.New(1000, 1000)
--
self.startPos=self.RoleLiveGO.transform.position
-- local combatId = BattleManager.GetCombatIdBySkin(self.role.skill[1],self.skinId)
-- self.combat = BattleManager.GetSkillCombat(combatId)
-- self.SkillAttackDisplaceoffset=self.combat.AttackDisplaceoffset
@ -278,7 +278,7 @@ function MonsterView:OnSkillCastingStart(skill)
--self.RoleLiveGO2.gameObject:SetActive(false)
if self.isMainPlayer then
self.RoleLiveGO3.gameObject:SetActive(false)
self.RoleLiveGO3.gameObject:SetActive(true)
else
self.RoleLiveGO3.gameObject:SetActive(true)
end

View File

@ -882,24 +882,29 @@ function SkillCaster:CheckSkillHitEffect(checkType, combat, skill)
local scale = combat.HitScale and Vector3.New(combat.HitScale[1]/1000, combat.HitScale[2]/1000, 0) or Vector3.One
local sortingOrder = self.owner.role.camp == 0 and self.owner.GameObject:GetComponent("Canvas").sortingOrder + 21 or BattleManager.GetBattleSorting() + 20
local go2 = BattleManager.LoadSpineAsset(combat.Hit, self.owner.SingleHitEffectRoot.transform)
if go2 then
-- 检测特效旋转
go2.transform:SetParent(self.owner.SingleHitEffectRoot.transform)
-- 检测特效旋转
local compnet=go2:GetComponent("SkeletonGraphic")
if compnet~=nil then
-- compnet.transform.localScale = Vector3.one * 3
-- compnet.transform.sizeDelta = Vector2.New(1000, 1000)
compnet.AnimationState:SetAnimation(0, "attack", true)
compnet.AnimationState.TimeScale=combat.HitTimeScale/1000
local compnet=go2:GetComponent("SkeletonGraphic")
if compnet~=nil then
-- compnet.transform.localScale = Vector3.one * 3
-- compnet.transform.sizeDelta = Vector2.New(1000, 1000)
compnet.AnimationState:SetAnimation(0, "attack", true)
compnet.AnimationState.TimeScale=combat.HitTimeScale/1000
end
if self:CheckRotate(go2, combat.HitOrientation) then
offset = -offset
end
go2.transform.localPosition = Vector3.zero--self.GameObject.transform.localPosition + Vector3.New(0, self.BuffFloatingCount * 180, 0)
go2.transform.anchoredPosition = offset--Vector2.zero
-- go2.transform:SetParent(self.effectRoot.transform)
go2.transform.localScale = scale
go2:SetActive(true)
BattleManager.AddDelayRecycleRes(combat.Hit, go2,combat.HitRecycleTime/1000 )
else
LogError("combat.hit=========="..combat.Hit.." is null")
end
if self:CheckRotate(go2, combat.HitOrientation) then
offset = -offset
end
go2.transform.localPosition = Vector3.zero--self.GameObject.transform.localPosition + Vector3.New(0, self.BuffFloatingCount * 180, 0)
go2.transform.anchoredPosition = offset--Vector2.zero
-- go2.transform:SetParent(self.effectRoot.transform)
go2.transform.localScale = scale
go2:SetActive(true)
BattleManager.AddDelayRecycleRes(combat.Hit, go2,combat.HitRecycleTime/1000 )
LogError("HitTime")
end