【战中表现】======身外化身表现优化

dev_chengFeng
wangzhenxing 2021-11-29 16:19:43 +08:00
parent 6279110ddd
commit ea7e7d31be
3 changed files with 14 additions and 4 deletions

View File

@ -99,6 +99,7 @@ function MonsterView:onCreate(go, role, position, root)
self.URoleProperty:AddProperty(name, value)
end)
end
self.combat=nil
end
--
@ -176,9 +177,12 @@ function MonsterView:OnSkillCastStart(skill)
--self.RoleLiveGO3.transform.position=Vector3.zero
local offset = self.camp == 0 and SpiritAnimal[20100].offset or SpiritAnimal[20100].enemy_offset
local add=roleConfig.enemy_offset
self.RoleLiveGO3:GetComponent("RectTransform").anchoredPosition = Vector2.New(0, offset[2]+add[2]+180)
if self.camp==1 then
self.RoleLiveGO3.transform.rotation=Vector3.New(0,180,0)
self.RoleLiveGO3:GetComponent("RectTransform").anchoredPosition = Vector2.New(0, offset[2]+add[2]+180)
else
self.RoleLiveGO2:GetComponent("RectTransform").anchoredPosition = Vector2.New(offset[1], offset[2]+300)
self.RoleLiveGO3:GetComponent("RectTransform").anchoredPosition = Vector2.New(0, offset[2]+add[2]+480)
end
local scale = roleConfig.enemy_liveScale
self.RoleLiveGO3.transform.localScale = Vector3.one * scale --* 2
@ -187,6 +191,11 @@ function MonsterView:OnSkillCastStart(skill)
self.RoleLiveGOTran3 = self.RoleLiveGO3:GetComponent("RectTransform")
self.RoleLiveGOGraphic3.AnimationState:SetAnimation(0, "attack", true)
self.RoleLiveGOTran3.sizeDelta = Vector2.New(1000, 1000)
self.castingNameNode:GetComponent("Image").sprite = self.spLoader:LoadSprite("c_swhs_00000_t9")
local eid = BattleManager.GetCombatIdBySkin(skill.id, skill.owner.skinId)
self.combat = BattleManager.GetSkillCombat(eid)
else
self.RoleLiveGO3=nil
end
end
--
@ -207,13 +216,13 @@ function MonsterView:OnSkillCastingStart(skill)
if self.role.roleData.id==20100 then
animName="idle"
end
self.RoleLiveGO2:GetComponent("RectTransform").rotation = Quaternion.Euler(Vector3.New(0, 0, 0))
if self.RoleLiveGO3 then
if (self.camp==0 and heroConfig and heroConfig.Toward==1) or (self.camp==1 and heroConfig and heroConfig.Toward==2) then
self.RoleLiveGO3:GetComponent("RectTransform").rotation = Quaternion.Euler(Vector3.New(0, 90, 0))
else
self.RoleLiveGO3:GetComponent("RectTransform").rotation = Quaternion.Euler(Vector3.New(0, -90, 0))
end
self.RoleLiveGO2:GetComponent("RectTransform").rotation = Quaternion.Euler(Vector3.New(0, 0, 0))
coroutine.start(function()
coroutine.wait(0.7)
@ -228,7 +237,7 @@ function MonsterView:OnSkillCastingStart(skill)
else
self.RoleLiveGO3.transform:DORotate(Vector3.New(0,0, 0),0.5)
end
self.castingNameNode:GetComponent("Image").sprite = self.spLoader:LoadSprite(self.combat.skillname)
animName="attack"
self:PlaySpineAnim(self.RoleLiveGOGraphic3, 0,animName , false)
coroutine.wait(1.5)

View File

@ -239,6 +239,7 @@ function this.ShowHeroLive(_heroSConfigData)
this.testLiveGO = poolManager:LoadLive(GetResourcePath(_heroSConfigData.Live), this.liveRoot.transform,
Vector3.one * _heroSConfigData.Scale*0.7, Vector3.New(_heroSConfigData.PositionView[1], _heroSConfigData.PositionView[2], 0))
local SkeletonGraphic = this.testLiveGO:GetComponent("SkeletonGraphic")
SetHEeroLiveToward(this.testLiveGO,_heroSConfigData.Toward,_heroSConfigData.PositionView)
local idle = function() SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true) end
SkeletonGraphic.AnimationState.Complete = SkeletonGraphic.AnimationState.Complete + idle
poolManager:SetLiveClearCall(GetResourcePath(_heroSConfigData.Live), this.testLiveGO, function ()

View File

@ -413,7 +413,7 @@ function SingleRecruitPanel:UpdataPanelData(_heroData)
--TODO:动态加载立绘
testLiveGO = poolManager:LoadLive(GetResourcePath(heroStaticData.Live), self.live2dRoot.transform,
Vector3.one * heroStaticData.Scale, Vector3.New(heroStaticData.Position[1],heroStaticData.Position[2],0))
SetHEeroLiveToward(testLiveGO,heroStaticData.Toward)
SetHEeroLiveToward(testLiveGO,heroStaticData.Toward,heroStaticData.Position)
local SkeletonGraphic = testLiveGO:GetComponent("SkeletonGraphic")
local idle = function() SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true) end
SkeletonGraphic.AnimationState.Complete = SkeletonGraphic.AnimationState.Complete + idle