【引导】添加战斗失败触发类型38, 添加引导进入假战斗类型20
parent
be1ce2a189
commit
b74274b75a
|
@ -806,6 +806,16 @@ function this.RefreshTriggerListen(id, openType, openArgs)
|
|||
end
|
||||
end
|
||||
Game.GlobalEvent:AddEvent(GameEvent.UI.OnOpen, trigger)
|
||||
elseif openType == 38 then
|
||||
--战斗失败算
|
||||
local trigger
|
||||
trigger = function(panelType)
|
||||
if panelType == UIName.BattleFailPopup then
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, trigger)
|
||||
this.ShowGuide(id)
|
||||
end
|
||||
end
|
||||
Game.GlobalEvent:AddEvent(GameEvent.UI.OnOpen, trigger)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -517,6 +517,20 @@ function this.ExecuteBehavior(beType, beArgs)
|
|||
Util.AddClick(this.button, this.NextGuide)
|
||||
end)
|
||||
this.SetBtnGOPosition(btn.gameObject:GetComponent("RectTransform").position)
|
||||
elseif beType == 20 then -- 进入假战斗
|
||||
this.canvas.enabled=false
|
||||
this.dialogRoot:SetActive(false)
|
||||
this.mask:SetActive(false)
|
||||
this.tipButtomRoot:SetActive(false)
|
||||
|
||||
local fdata, fseed = BattleManager.GetFakeBattleData(tonumber(beArgs))
|
||||
local testFightData = {
|
||||
fightData = fdata,
|
||||
fightSeed = fseed,
|
||||
fightType = 0,
|
||||
maxRound = 20
|
||||
}
|
||||
UIManager.OpenPanel(UIName.BattlePanel, testFightData, BATTLE_TYPE.Test)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -556,6 +570,7 @@ end
|
|||
|
||||
function this.ShowGuide(id)
|
||||
this.id = id
|
||||
this.canvas.enabled = true
|
||||
this.gameObject:GetComponent("Image").raycastTarget = true
|
||||
if GuideConfig[id].Position then
|
||||
this.dialogRoot:SetActive(true)
|
||||
|
|
Loading…
Reference in New Issue