[战斗]===============报空判断修改
parent
5316c03eee
commit
e7abac49ce
|
@ -36,7 +36,7 @@ function MonsterView:onCreate(go, role, position, root)
|
||||||
end
|
end
|
||||||
if role.roleData.id == 20100 then
|
if role.roleData.id == 20100 then
|
||||||
if role.sex == ROLE_SEX.BOY then
|
if role.sex == ROLE_SEX.BOY then
|
||||||
self.livePath = "live2d_caomaolufei"
|
self.livePath = "live2d_caomaolufeizhanshi"
|
||||||
else
|
else
|
||||||
self.livePath = "live2d_namei"
|
self.livePath = "live2d_namei"
|
||||||
end
|
end
|
||||||
|
@ -75,7 +75,7 @@ function MonsterView:onCreate(go, role, position, root)
|
||||||
self.RoleLiveGOTran = self.RoleLiveGO:GetComponent("RectTransform")
|
self.RoleLiveGOTran = self.RoleLiveGO:GetComponent("RectTransform")
|
||||||
self.RoleLiveGOGraphic.AnimationState:SetAnimation(0, "idle", true)
|
self.RoleLiveGOGraphic.AnimationState:SetAnimation(0, "idle", true)
|
||||||
self.RoleLiveGOTran.sizeDelta = Vector2.New(1000, 1000)
|
self.RoleLiveGOTran.sizeDelta = Vector2.New(1000, 1000)
|
||||||
--
|
self.startPos=self.RoleLiveGO.transform.position
|
||||||
-- local combatId = BattleManager.GetCombatIdBySkin(self.role.skill[1],self.skinId)
|
-- local combatId = BattleManager.GetCombatIdBySkin(self.role.skill[1],self.skinId)
|
||||||
-- self.combat = BattleManager.GetSkillCombat(combatId)
|
-- self.combat = BattleManager.GetSkillCombat(combatId)
|
||||||
-- self.SkillAttackDisplaceoffset=self.combat.AttackDisplaceoffset
|
-- self.SkillAttackDisplaceoffset=self.combat.AttackDisplaceoffset
|
||||||
|
@ -278,7 +278,7 @@ function MonsterView:OnSkillCastingStart(skill)
|
||||||
|
|
||||||
--self.RoleLiveGO2.gameObject:SetActive(false)
|
--self.RoleLiveGO2.gameObject:SetActive(false)
|
||||||
if self.isMainPlayer then
|
if self.isMainPlayer then
|
||||||
self.RoleLiveGO3.gameObject:SetActive(false)
|
self.RoleLiveGO3.gameObject:SetActive(true)
|
||||||
else
|
else
|
||||||
self.RoleLiveGO3.gameObject:SetActive(true)
|
self.RoleLiveGO3.gameObject:SetActive(true)
|
||||||
end
|
end
|
||||||
|
|
|
@ -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 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 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)
|
local go2 = BattleManager.LoadSpineAsset(combat.Hit, self.owner.SingleHitEffectRoot.transform)
|
||||||
|
if go2 then
|
||||||
|
-- 检测特效旋转
|
||||||
go2.transform:SetParent(self.owner.SingleHitEffectRoot.transform)
|
go2.transform:SetParent(self.owner.SingleHitEffectRoot.transform)
|
||||||
-- 检测特效旋转
|
local compnet=go2:GetComponent("SkeletonGraphic")
|
||||||
local compnet=go2:GetComponent("SkeletonGraphic")
|
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)
|
compnet.AnimationState:SetAnimation(0, "attack", true)
|
||||||
compnet.AnimationState:SetAnimation(0, "attack", true)
|
compnet.AnimationState.TimeScale=combat.HitTimeScale/1000
|
||||||
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
|
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")
|
LogError("HitTime")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue