xiyou_sanguo
zhangjiannan 2025-04-03 21:09:15 +08:00
parent 2735c4d66c
commit 43d6c878d4
3 changed files with 67 additions and 48 deletions

View File

@ -171,7 +171,11 @@ function PatFacePanel:OnShowPatFaceData()
patFaceSingleData.Type == FacePanelType.xuanyuanbaojing or
patFaceSingleData.Type == FacePanelType.jianmushenshu or
patFaceSingleData.Type == FacePanelType.silnigshilian or
patFaceSingleData.Type == FacePanelType.redTreasure then
patFaceSingleData.Type == FacePanelType.redTreasure or
patFaceSingleData.Type == FacePanelType.XinTanchuang_1 or
patFaceSingleData.Type == FacePanelType.XinTanchuang_2 or
patFaceSingleData.Type == FacePanelType.XinTanchuang_3 or
patFaceSingleData.Type == FacePanelType.XinTanchuang_4 then
self:OnShowOb7Data(patFaceSingleData.Type)
elseif patFaceSingleData.Type == FacePanelType.TimeLimitSkin then
self:OnShowOb8Data()
@ -385,13 +389,22 @@ end
--第七种 升级限时礼包
function PatFacePanel:OnShowOb7Data(Type)
OperatingManager.upGradePackagePanelIndex = 0
LogError("sssssssssssssssssssss"..Type)
OperatingManager.upGradePackagePanelIndex = 2
if Type == FacePanelType.UpgradePac then
OperatingManager.upGradePackagePanelType = 1
elseif Type == FacePanelType.MonsterWave then
OperatingManager.upGradePackagePanelType = 4
elseif Type == FacePanelType.MainLevel then
OperatingManager.upGradePackagePanelType = 3
elseif Type == FacePanelType.XinTanchuang_1 then
OperatingManager.upGradePackagePanelType = 5
elseif Type == FacePanelType.XinTanchuang_2 then
OperatingManager.upGradePackagePanelType = 6
elseif Type == FacePanelType.XinTanchuang_3 then
OperatingManager.upGradePackagePanelType = 7
elseif Type == FacePanelType.XinTanchuang_4 then
OperatingManager.upGradePackagePanelType = 8
elseif Type == FacePanelType.Pokemon then
OperatingManager.upGradePackagePanelType = 5
elseif Type == FacePanelType.Surprise then

View File

@ -537,7 +537,7 @@ function this:BindEvent()
end)
--调研
Util.AddClick(this.btnDiaoyan, function()
OpenWeb("http://wwww.baidu.com")
OpenWeb("https://docs.google.com/forms/d/e/1FAIpQLScVbmO2_ib_qTan5L81l3ICEW-RHcqQiLHh8fsXs8l-KYsL3Q/viewform")
end)
--十五日登录奖励
Util.AddClick(this.fgBtn, function()

View File

@ -16,7 +16,7 @@ function BattleFailPopup:InitComponent()
this.btnClose = Util.GetGameObject(self.gameObject, "Lose")
this.failImg = Util.GetGameObject(self.gameObject, "Lose/image/ziti"):GetComponent("Image")
this.failImg.sprite = this.spLoader:LoadSprite("UI_effect_JJC_JieSuan_ShiBai_png_zh")
this.btn_record=Util.GetGameObject(this.btnClose, "layout/record")
this.btn_record = Util.GetGameObject(this.btnClose, "layout/record")
this.btnBattleBack = Util.GetGameObject(this.btnClose, "btnBattleBack")
this.btnBattleBack:GetComponent("Image").sprite = this.spLoader:LoadSprite("s_silingshilian_huifanganniu_zh")
this.btnGrowUp = Util.GetGameObject(this.btnClose, "btnGrowUp")
@ -24,12 +24,12 @@ end
--绑定事件(用于子类重写)
function BattleFailPopup:BindEvent()
Util.AddClick(this.btnClose, function ()
Util.AddClick(this.btnClose, function()
-- 三秒后才能关闭
if GetTimeStamp() - this.openTime < 1 then
return
return
end
this.ClosePanelRefreshData()
if m_battlePanel then
m_battlePanel:ClosePanel()
@ -40,14 +40,13 @@ function BattleFailPopup:BindEvent()
UIManager.OpenPanel(m_backPanel)
end
-- this.ClosePanelRefreshData()
end)
Util.AddClick(this.btnGrowUp, function ()
Util.AddClick(this.btnGrowUp, function()
-- 一秒后才能跳转
if GetTimeStamp() - this.openTime < 1 then
return
return
end
this.ClosePanelRefreshData()
if m_battlePanel then
m_battlePanel:ClosePanel()
@ -57,21 +56,21 @@ function BattleFailPopup:BindEvent()
JumpManager.GoJump(48001)
end)
Util.AddClick(Util.GetGameObject(this.btnClose, "tip/zhaomu"), function ()
Util.AddClick(Util.GetGameObject(this.btnClose, "tip/zhaomu"), function()
FightManager.curIsInFightArea = 0
this:LoseJump(1001)
this.ClosePanelRefreshData()
end)
Util.AddClick(Util.GetGameObject(this.btnClose, "tip/chengyuan"), function ()
Util.AddClick(Util.GetGameObject(this.btnClose, "tip/chengyuan"), function()
FightManager.curIsInFightArea = 0
this:LoseJump(22001)
this.ClosePanelRefreshData()
end)
Util.AddClick(Util.GetGameObject(this.btnClose, "record"), function ()
Util.AddClick(Util.GetGameObject(this.btnClose, "record"), function()
UIManager.OpenPanel(UIName.DamageResultPanel, 0)
--this.ClosePanelRefreshData()
end)
Util.AddClick(this.btnBattleBack, function ()
Util.AddClick(this.btnBattleBack, function()
--LogGreen("isBackBattle = true")
isBackBattle = true
BattleManager.BattleBackFun()
@ -94,15 +93,15 @@ function BattleFailPopup:OnSortingOrderChange()
end
--界面打开时调用(用于子类重写)
function BattleFailPopup:OnOpen(battlePanel, showRecord, backPanel,_fightType)
function BattleFailPopup:OnOpen(battlePanel, showRecord, backPanel, _fightType)
this.openTime = GetTimeStamp()
--LogGreen("isBackBattle = false")
isBackBattle = false
if battlePanel then
m_battlePanel = battlePanel
end
m_showRecord = true -- 默认显示
if showRecord == false then
m_showRecord = true -- 默认显示
if showRecord == false then
m_showRecord = showRecord
end
m_backPanel = nil
@ -114,8 +113,8 @@ function BattleFailPopup:OnOpen(battlePanel, showRecord, backPanel,_fightType)
end
FightPointPassManager.FightBattleEnd()
Util.GetGameObject(this.btnClose, "record"):SetActive(m_showRecord)
Util.GetGameObject(this.btnClose,"tip"):SetActive(not fightType ==12)--副本内无法点击招募
if fightType == BATTLE_TYPE.MAP_FIGHT or GuideManager.IsInMainGuide() or MapManager.Mapping or fightType == BATTLE_TYPE.Test or fightType == BATTLE_TYPE.EndlessMpaFight then--地图
Util.GetGameObject(this.btnClose, "tip"):SetActive(not fightType == 12) --副本内无法点击招募
if fightType == BATTLE_TYPE.MAP_FIGHT or GuideManager.IsInMainGuide() or MapManager.Mapping or fightType == BATTLE_TYPE.Test or fightType == BATTLE_TYPE.EndlessMpaFight then --地图
this.btnBattleBack:SetActive(false)
this.btnGrowUp:SetActive(false)
elseif fightType == BATTLE_TYPE.GodsWayTower then
@ -125,13 +124,18 @@ function BattleFailPopup:OnOpen(battlePanel, showRecord, backPanel,_fightType)
this.btnBattleBack:SetActive(true)
this.btnGrowUp:SetActive(true)
end
if fightType == BATTLE_TYPE.GUILD_CAR_DELAY then--车迟
if fightType == BATTLE_TYPE.GUILD_CAR_DELAY then --车迟
--车迟抢夺cd计时
GuildCarDelayManager.SetCdTime(GuildCarDelayProType.Loot)
end
if PlayerManager.serverTime > (PlayerPrefs.GetInt("FirstRecharge", 0) + 86400) then
local activityId = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.FirstRecharge)
if activityId and activityId ~= 0 and ActTimeCtrlManager.SingleFuncState(1) then
UIManager.OpenPanel(UIName.FirstRechargePanel)
end
end
end
function this:LoseJump(id)
if not MapManager.Mapping then
if JumpManager.CheckJump(id) then
@ -145,34 +149,36 @@ function this:LoseJump(id)
PopupTipPanel.ShowTip(Language[10237])
end
end
function this.ClosePanelRefreshData()
LogRed("fightType:"..tostring(fightType))
function this.ClosePanelRefreshData()
LogRed("fightType:" .. tostring(fightType))
if fightType then
if fightType == BATTLE_TYPE.EXECUTE_FIGHT then--远征
if fightType == BATTLE_TYPE.EXECUTE_FIGHT then --远征
this.ShowBattleResultByExpedition()
elseif fightType == BATTLE_TYPE.XIAOYAOYOU then--逍遥游
elseif fightType == BATTLE_TYPE.XIAOYAOYOU then --逍遥游
this.ShowBattleResultByXYY()
elseif fightType == BATTLE_TYPE.FOURELEMENT then--四灵
elseif fightType == BATTLE_TYPE.FOURELEMENT then --四灵
this.ShowBattleResultByFOURELEMENT()
--新回放功能
--新回放功能
elseif fightType == BATTLE_TYPE.BACK_BATTLE then
if BattleManager.GetLastBattleType() == BATTLE_TYPE.EXECUTE_FIGHT then-- 猎妖之路
if BattleManager.GetLastBattleType() == BATTLE_TYPE.EXECUTE_FIGHT then -- 猎妖之路
this.ShowBattleResultByExpedition()
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.XIAOYAOYOU then-- 逍遥游
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.XIAOYAOYOU then -- 逍遥游
this.ShowBattleResultByXYY()
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.FOURELEMENT then--四灵
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.FOURELEMENT then --四灵
this.ShowBattleResultByFOURELEMENT()
end
end
end
end
-- 逍遥游结算界面特殊显示
function this.ShowBattleResultByXYY()
if not isBackBattle then
XiaoYaoManager.OpenXiaoYaoMap(XiaoYaoManager.curMapId,function()
XiaoYaoManager.OpenXiaoYaoMap(XiaoYaoManager.curMapId, function()
this.fightBossIndex = XiaoYaoManager.fightBossOldIndex
UIManager.OpenPanel(UIName.XiaoYaoLuckyBossPopup)
end)
end)
end
end
@ -192,46 +198,46 @@ function this.ShowBattleResultByJumpServerHightLadder()
PopupText(content, 0.5, 2)
end
end
-- 猎妖之路结算界面特殊显示
function this.ShowBattleResultByExpedition()
if not isBackBattle then
local GetCurNodeInfo = ExpeditionManager.curAttackNodeInfo
if GetCurNodeInfo.type == ExpeditionNodeType.Greed then--贪婪节点
Timer.New(function ()
if GetCurNodeInfo.type == ExpeditionNodeType.Greed then --贪婪节点
Timer.New(function()
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshPlayAniMainPanel)
-- Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshMainPanel)--刷新界面
end,0.3):Start()
PopupTipPanel.ShowTip( Language[12088])
end, 0.3):Start()
PopupTipPanel.ShowTip(Language[12088])
else
MsgPanel.ShowTwo(Language[12089], function()
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshMainPanel)--刷新界面
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshMainPanel) --刷新界面
end, function()
NetManager.EndConfirmExpeditionBattleRequest(GetCurNodeInfo.sortId, function (msg)
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshMainPanel)--刷新界面
NetManager.EndConfirmExpeditionBattleRequest(GetCurNodeInfo.sortId, function(msg)
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshMainPanel) --刷新界面
end)
end,Language[10685],Language[12090])
end, Language[10685], Language[12090])
-- Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshMainPanel)--刷新界面
end
end
end
function this.ShowBattleResultByFOURELEMENT()
if MonsterCampManager.fourMonsterData[MonsterCampManager.curType].openState ~= 0 then
UIManager.OpenPanel(UIName.FourElementMonsterCampPanel,MonsterCampManager.curType)
if MonsterCampManager.fourMonsterData[MonsterCampManager.curType].openState ~= 0 then
UIManager.OpenPanel(UIName.FourElementMonsterCampPanel, MonsterCampManager.curType)
else
UIManager.OpenPanel(UIName.MonsterCampMainPanel)
end
end
end
--界面关闭时调用(用于子类重写)
function BattleFailPopup:OnClose()
Game.GlobalEvent:DispatchEvent(GameEvent.Map.MaskState,0)
Game.GlobalEvent:DispatchEvent(GameEvent.Map.MaskState, 0)
end
--界面销毁时调用(用于子类重写)
function BattleFailPopup:OnDestroy()
this.spLoader:Destroy()
end
return BattleFailPopup
return BattleFailPopup