diff --git a/Assets/ManagedResources/~Lua/Modules/Fight/FightAreaRewardPopup.lua b/Assets/ManagedResources/~Lua/Modules/Fight/FightAreaRewardPopup.lua index 35e0e8ca2b..b63b781517 100644 --- a/Assets/ManagedResources/~Lua/Modules/Fight/FightAreaRewardPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Fight/FightAreaRewardPopup.lua @@ -59,7 +59,9 @@ end function FightAreaRewardPopup:OnShow() local curFightId = FightPointPassManager.GetCurFightId() LogError("FightPointPassManager.soldierLayerId==============================="..FightPointPassManager.soldierLayerId) - local config =ConfigManager.GetConfigData(ConfigName.SoldierStageConfig,FightPointPassManager.soldierLayerId) --ConfigManager.GetConfigData(ConfigName.MainLevelConfig, curFightId) + LogError("curFightId======================="..curFightId) + local config =ConfigManager.GetConfigData(ConfigName.SoldierStageConfig,FightPointPassManager.soldierLayerId) + local mainLvConfig=ConfigManager.GetConfigData(ConfigName.MainLevelConfig, curFightId) if config then --LogError("config.id============================"..config.Id) if not config.RewardShowMin or #config.RewardShowMin < 1 then @@ -71,16 +73,16 @@ function FightAreaRewardPopup:OnShow() if not _ProductList[index] then _ProductList[index] = newObjToParent(this.item, this.itemGrid.transform) end - LogError("item[1]============"..item[1].." item[2]==========="..item[2]) + --LogError("item[1]============"..item[1].." item[2]==========="..item[2]) this.ItemAdapter(_ProductList[index], item) end end local randReward = {} - if config.RewardShow and #config.RewardShow > 0 then - for j = 1, #config.RewardShow do - randReward[#randReward + 1] = config.RewardShow[j] + if mainLvConfig.RewardShow and #mainLvConfig.RewardShow > 0 then + for j = 1, #mainLvConfig.RewardShow do + randReward[#randReward + 1] = mainLvConfig.RewardShow[j] end end local open, extral = FightPointPassManager.GetExtralReward() diff --git a/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua index 78e5e3cc41..e0d447d540 100644 --- a/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua @@ -236,6 +236,7 @@ function FightPointPassMainPanel:InitComponent() this.costImg=Util.GetGameObject(self.gameObject, "soldierObj/costImg"):GetComponent("Image") this.costTxt=Util.GetGameObject(self.gameObject, "soldierObj/Text"):GetComponent("Text") this.costImg.sprite=SetIcon(this.spLoader,tonumber(cost[1])) + --兵种信息 this.soliderList={} for i=1,12 do @@ -277,13 +278,16 @@ function FightPointPassMainPanel:InitComponent() this.bossImg=Util.GetGameObject(self.gameObject, "battlePanel/bossObj/icon"):GetComponent("Image") this.bossNum=Util.GetGameObject(self.gameObject, "battlePanel/bossObj/num"):GetComponent("Text") this.hpBar=Util.GetGameObject(self.gameObject, "battlePanel/hpBar/Image"):GetComponent("Image") + this.onHookObj= Util.GetGameObject(self.gameObject, "Bg/boxRoot") end --绑定事件(用于子类重写) function FightPointPassMainPanel:BindEvent() invadeMonster:BindEvent() - + Util.AddClick(this.costImg.gameObject,function () + UIManager.OpenPanel(UIName.RewardItemSingleShowPopup,tonumber(cost[1])) + end) Util.AddClick(this.btn_change, function () --如果有可以替换的或可以上阵的 @@ -324,7 +328,7 @@ function FightPointPassMainPanel:BindEvent() Util.AddClick(this.btnrewardDetail, function () UIManager.OpenPanel(UIName.FightAreaRewardPopup) end) - + -- 我要喝牛奶变强 Util.AddClick(this.btnGetForce, function () --UIManager.OpenPanel(UIName.GiveMePowerPanel) @@ -515,7 +519,16 @@ function this.ShowBattleInfo() this.bossLiveGO.transform.localPosition = Vector2.New(0, 0) this.bossLiveGO.transform.localScale=Vector3.one * roleConfig[curSoliderStageConfig.Hero].enemy_liveScale*0.5 bossSpine=this.bossLiveGO:GetComponent("SkeletonGraphic") + end + if this.bossLiveGOEffect==nil then + this.bossLiveGOEffect = poolManager:LoadAsset("c_xy_0012_skeff_slidesk_ballistic", PoolManager.AssetType.GameObject) + this.bossLiveGOEffect.transform:SetParent(this.enemyPos.transform) + this.bossLiveGOEffect.transform.localScale = Vector3.one + this.bossLiveGOEffect.transform.localPosition = Vector3.New(0, 0, 0) + this.bossLiveGOEffect:SetActive(false) + end + Util.SetParticleSortLayer(this.bossLiveGOEffect, orginLayer+2) local team=FormationManager.GetFormationByID(FormationTypeDef.FORMATION_NORMAL) for i=1,6 do @@ -562,6 +575,18 @@ function this.ShowBattleInfo() soliderPreList[index].effect.transform:SetParent(soliderPreList[index].pos.transform) soliderPreList[index].effect.transform.localScale = Vector3.one soliderPreList[index].effect.transform.localPosition = Vector3.New(0, 0, 0) + local spineObj + if soliderPreList[index].spine==nil then + spineObj= poolManager:LoadLive("live2d_npc_map_boy",soliderPreList[index].pos.transform, Vector3.one, Vector3.zero) + else + --roleLiveGO=heroSpineList[heroData.live] + end + spineObj.transform:SetParent(soliderPreList[index].pos.transform) + spineObj.transform.localPosition = Vector2.New(0, -20) + spineObj.transform.localScale=Vector3.one * 0.15 + soliderPreList[index].spine=spineObj + soliderPreList[index].spineAni=spineObj:GetComponent("SkeletonGraphic") + soliderPreList[index].spineAni.AnimationState:SetAnimation(0, "move3",true) soliderPreList[index].data=v soliderPreList[index].effect:SetActive(false) Util.SetParticleSortLayer(soliderPreList[index].effect, orginLayer+2) @@ -587,10 +612,15 @@ function this.BattleLogic() local isHit=false --如果切回这个界面还在打这个boss local bossInfo=SmallSoldierManager.bossInfo - if bossInfo and bossInfo.id==FightPointPassManager.soldierLayerId then + if bossInfo then local curTime=GetTimeStamp() local cha=math.floor(curTime - bossInfo.leaveTime) - battleTime=battleTime- cha + --LogError("cha==============="..cha.." ") + cha=cha%curSoliderStageConfig.Time + --LogError("cha==============================================="..cha) + battleTime=battleTime-cha + --LogError("battletime==============="..battleTime) + battleTime=math.abs(battleTime) if battleTime>0 then bossHp=bossHp-math.floor(cha/timeStamp)*bossInfo.attack else @@ -693,6 +723,11 @@ function this.BattleLogic() curSoliderStageConfig=ConfigManager.GetConfigData(ConfigName.SoldierStageConfig,FightPointPassManager.soldierLayerId) local heroData = ConfigManager.GetConfigData(ConfigName.HeroConfig,curSoliderStageConfig.Hero) local name=GetResourcePath(heroData.Live) + this.bossLiveGOEffect:SetActive(true) + this.bossLiveGOEffect:GetComponent("RectTransform"):DOMove(this.onHookObj.transform.position, 1, false):OnComplete(function () + this.bossLiveGOEffect:SetActive(false) + this.bossLiveGOEffect.transform.position=this.enemyPos.transform.position + end) --换boss了 if name~=this.bossLiveName then poolManager:UnLoadLive(this.bossLiveName, this.bossLiveGO, PoolManager.AssetType.GameObject) @@ -1338,6 +1373,8 @@ function FightPointPassMainPanel:OnDestroy() -- poolManager:UnLoadAsset("GuideEffect", this.GuideEffectGo, PoolManager.AssetType.GameObject) -- poolManager:UnLoadAsset("GuideEffect", this.GuideJumpEffectGo, PoolManager.AssetType.GameObject) poolManager:UnLoadLive(fightAnimRes, this.animGo, PoolManager.AssetType.GameObject) + poolManager:UnLoadLive("c_xy_0012_skeff_slidesk_ballistic", this.bossLiveGOEffect, PoolManager.AssetType.GameObject) + this.bossLiveGOEffect=nil SubUIManager.Close(this.UpView) SubUIManager.Close(this.BtView) --ClearRedPointObject(RedPointType.DailyTaskMain, this.dailyRedPoint) @@ -1357,6 +1394,8 @@ function FightPointPassMainPanel:OnDestroy() poolManager:UnLoadAsset(k,v,poolManager.AssetType.GameObject) end poolManager:UnLoadLive(this.bossLiveName, this.bossLiveGO, PoolManager.AssetType.GameObject) + poolManager:UnLoadLive("c_xy_0012_skeff_slidesk_ballistic", this.bossLiveGOEffect, PoolManager.AssetType.GameObject) + this.bossLiveGOEffect=nil heroSpineList={} this.heroList={} soliderPreList={} diff --git a/Assets/ManagedResources/~Lua/Modules/Gem/SmallSoldierInfoPanel.lua b/Assets/ManagedResources/~Lua/Modules/Gem/SmallSoldierInfoPanel.lua index 4df444c99b..2cd887bc0b 100644 --- a/Assets/ManagedResources/~Lua/Modules/Gem/SmallSoldierInfoPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Gem/SmallSoldierInfoPanel.lua @@ -259,7 +259,8 @@ end function SmallSoldierInfoPanel:OnClose() - + oldData=nil + newData=nil end function SmallSoldierInfoPanel:OnDestroy() diff --git a/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua b/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua index 13a1a8797d..94616a9773 100644 --- a/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua @@ -7886,7 +7886,8 @@ function NetManager.SoldierFightCheckRequest(_type,_func) local msg = MapInfoProto_pb.SoldierFightCheckResponse() msg:ParseFromString(data) if msg.drop and type==1 then - UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1) + --boss被击败后不显示掉落奖励 + --UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1) end if _func then _func(msg)