diff --git a/Assets/ManagedResources/Prefabs/UI/Fight/FightPointPassMainPanel.prefab b/Assets/ManagedResources/Prefabs/UI/Fight/FightPointPassMainPanel.prefab index cd8e97365b..ed3886d309 100644 --- a/Assets/ManagedResources/Prefabs/UI/Fight/FightPointPassMainPanel.prefab +++ b/Assets/ManagedResources/Prefabs/UI/Fight/FightPointPassMainPanel.prefab @@ -37516,7 +37516,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 912, y: -1293} + m_AnchoredPosition: {x: 50, y: -208.75} m_SizeDelta: {x: 100, y: 217.5} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &1473222624206509369 @@ -43998,7 +43998,7 @@ MonoBehaviour: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1524946575228718866} - m_Enabled: 1 + m_Enabled: 0 m_EditorHideFlags: 0 m_Script: {fileID: -2095666955, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: diff --git a/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua index 303a910f7d..cb7c9a0fd4 100644 --- a/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua @@ -587,7 +587,7 @@ function this.ShowBattleInfo() end roleLiveGO.transform:SetParent(this.heroList[i].pos.transform) roleLiveGO.transform.localPosition = Vector2.New(0, 0) - roleLiveGO.transform.localScale=Vector3.one * roleConfig[sId].enemy_liveScale*0.3 -- * 0.75--* 1.5 + roleLiveGO.transform.localScale=Vector3.one * roleConfig[sId].enemy_liveScale*0.2 -- * 0.75--* 1.5 if i<=3 then if heroData.heroConfig.Toward==1 then SetHEeroLiveToward(roleLiveGO,1) @@ -641,7 +641,8 @@ function this.ShowBattleInfo() soliderPreList[index].spine=spineObj soliderPreList[index].spineName=spineName end - + --LogError("soliderSettingConfig[v.id].Position=="..soliderSettingConfig[v.id].Position) + soliderPreList[index].go.transform.localPosition=Vector2.New(soliderSettingConfig[v.id].FightPosition[1],soliderSettingConfig[v.id].FightPosition[2]) soliderPreList[index].spineAni=soliderPreList[index].spine:GetComponent("SkeletonGraphic") soliderPreList[index].spineAni.AnimationState:SetAnimation(0, "move3",true) @@ -688,43 +689,51 @@ function this.BattleLogic() this.timeTxt.text=battleTime this.hpTxt.text=bossHp LogError("curSoliderStageConfig.Time===="..curSoliderStageConfig.Time.." curSoliderStageConfig.Hp=="..curSoliderStageConfig.Hp) + local bossPos=Vector3.New(this.enemyPos.transform.position.x,this.enemyPos.transform.position.y+1,0) this.battleTimer = Timer.New(function() cd=cd+1 - --每隔三秒攻击一次 - --local seed= math.random(0,100)/100 - + --每隔三秒攻击一次 if cd==timeStamp then --英雄攻击 allAttacck=0 for i=1,6 do if this.heroList[i].spine then this.heroList[i].effect.transform.position =this.heroList[i].pos.transform.position - this.heroList[i].spine.AnimationState:SetAnimation(0, "touch", true) - Util.ClearTrailRender(this.heroList[i].effect) - this.heroList[i].effect:SetActive(true) - this.heroList[i].effect:GetComponent("RectTransform"):DOMove(this.enemyPos.transform.position, 0.6, false):OnComplete(function () - if this.heroList[i].effect then - this.heroList[i].effect:SetActive(false) + local seed= math.random(0,100)/100 + local timer1 = Timer.New(function() + if this.heroList[i].spine and this.heroList[i].effect then + this.heroList[i].spine.AnimationState:SetAnimation(0, "touch", true) + Util.ClearTrailRender(this.heroList[i].effect) + this.heroList[i].effect:SetActive(true) + this.heroList[i].effect:GetComponent("RectTransform"):DOMove(bossPos, 0.6, false):OnComplete(function () + if this.heroList[i].effect then + this.heroList[i].effect:SetActive(false) + end + this.heroList[i].spine.AnimationState:SetAnimation(0, "idle", true) + --LogError("this.heroList[i].data.attack=="..this.heroList[i].data.attack) + local proList=HeroPropManager.GetHeroProp(this.heroList[i].data.dynamicId, FormationTypeDef.FORMATION_NORMAL) + --LogError("prolist[2]==============="..proList[2]) + --for i=1,5 do + bossHp=bossHp-proList[2] + allAttacck=allAttacck+proList[2] + this.Floater:ArtFloatingOnHook(ArtFloatingType.Damage,ArtFloatingColor.White,proList[2]) + + --end + isHit=true + if isHit then + --LogError("boss被攻击======================================") + bossSpine.AnimationState:SetAnimation(0, "hit",false) + + isHit=false + end + this.SetHp(curSoliderStageConfig.Hp,bossHp,curSoliderStageConfig.HpNumber) + end) end - this.heroList[i].spine.AnimationState:SetAnimation(0, "idle", true) - --LogError("this.heroList[i].data.attack=="..this.heroList[i].data.attack) - local proList=HeroPropManager.GetHeroProp(this.heroList[i].data.dynamicId, FormationTypeDef.FORMATION_NORMAL) - --LogError("prolist[2]==============="..proList[2]) - --for i=1,5 do - bossHp=bossHp-proList[2] - allAttacck=allAttacck+proList[2] - this.Floater:ArtFloatingOnHook(ArtFloatingType.Damage,ArtFloatingColor.White,proList[2]) - --end - isHit=true - if isHit then - --LogError("boss被攻击======================================") - bossSpine.AnimationState:SetAnimation(0, "hit",false) - - isHit=false - end - this.SetHp(curSoliderStageConfig.Hp,bossHp,curSoliderStageConfig.HpNumber) - end) + end, seed, 1, true) + timer1:Start() + + end end local lotteryConfig=ConfigManager.GetConfigData(ConfigName.SoldiersLotteryConfig,SmallSoldierManager.level) @@ -735,20 +744,27 @@ function this.BattleLogic() --if aaa.spine then aaa.effect.transform.position =aaa.pos.transform.position --aaa.spine.AnimationState:SetAnimation(0, "touch", true) - Util.ClearTrailRender(aaa.effect) - aaa.effect:SetActive(true) - aaa.spineAni.AnimationState:SetAnimation(0, "attack3",false) - aaa.effect:GetComponent("RectTransform"):DOMove(this.enemyPos.transform.position, 0.6, false):OnComplete(function () - if aaa.effect then - aaa.effect:SetActive(false) + local seed1 = math.random(0,100)/100 + local timer2=Timer.New(function() + if aaa.effect and aaa.spineAni then + Util.ClearTrailRender(aaa.effect) + aaa.effect:SetActive(true) + aaa.spineAni.AnimationState:SetAnimation(0, "attack3",false) + aaa.effect:GetComponent("RectTransform"):DOMove(bossPos, 0.6, false):OnComplete(function () + if aaa.effect then + aaa.effect:SetActive(false) + end + local attack=math.floor(aaa.data.attributes[2].value*(1+add)+0.5) + bossHp=bossHp-attack + allAttacck=allAttacck+attack + this.Floater:ArtFloatingOnHook(ArtFloatingType.Damage,ArtFloatingColor.White,attack) + aaa.spineAni.AnimationState:SetAnimation(0, "move3",true) + this.SetHp(curSoliderStageConfig.Hp,bossHp,curSoliderStageConfig.HpNumber) + end) end - local attack=math.floor(aaa.data.attributes[2].value*(1+add)+0.5) - bossHp=bossHp-attack - allAttacck=allAttacck+attack - this.Floater:ArtFloatingOnHook(ArtFloatingType.Damage,ArtFloatingColor.White,attack) - aaa.spineAni.AnimationState:SetAnimation(0, "move3",true) - this.SetHp(curSoliderStageConfig.Hp,bossHp,curSoliderStageConfig.HpNumber) - end) + + end,seed1, 1, true) + timer2:Start() --end end curAttack=allAttacck