弹窗
This commit is contained in:
parent
7552e3a946
commit
2959b8db73
@ -18,6 +18,10 @@ function BattleManager:showBattleResultUI(rewards, combatReport, mysteryBoxIdx)
|
||||
UIManager:showUI("app/ui/battle/battle_result_ui", {rewards = rewards, combatReport = combatReport, mysteryBoxIdx = mysteryBoxIdx})
|
||||
end
|
||||
|
||||
function BattleManager:showBoxOpenUI(rewards, callback)
|
||||
UIManager:showUI("app/ui/battle/battle_box_open_ui", {rewards = rewards, callback = callback})
|
||||
end
|
||||
|
||||
function BattleManager:playBattle(battleType, params, returnFunc)
|
||||
params = params or {}
|
||||
if self.battleController then -- 同一时间只能有一场战斗
|
||||
|
||||
@ -1011,7 +1011,7 @@ function BattleController:dealGridBreak(posId, condition, time, breakedMap, sequ
|
||||
end
|
||||
end
|
||||
if entity:getEffectType() then
|
||||
local list = BATTLE_GRID_EFFECT_HANDLE.gridEffectOn(posId, gridEntities, BattleConst.GRID_EFFECT_TRIGGER_TYPE.ON_GRID_BREAK, self, onlyCheck)
|
||||
local succ, list = BATTLE_GRID_EFFECT_HANDLE.gridEffectOn(posId, gridEntities, BattleConst.GRID_EFFECT_TRIGGER_TYPE.ON_GRID_BREAK, self, onlyCheck)
|
||||
if list then
|
||||
aniUnit.aniPosList = {}
|
||||
aniUnit.overCallback = aniUnit.callback
|
||||
@ -1156,7 +1156,7 @@ function BattleController:onFillBoardOver(isRoundBeginCheck)
|
||||
local index = table.remove(self.showMysteryBoxIndexs, 1)
|
||||
local boardList, _, mysteryBoxIndexMap = self:getInitBoard()
|
||||
local rewards = mysteryBoxIndexMap[index]
|
||||
ModuleManager.TipsManager:showRewardsTips(rewards, nil, nil, function()
|
||||
ModuleManager.BattleManager:showBoxOpenUI(rewards, function()
|
||||
self:onFillBoardOver()
|
||||
end)
|
||||
return
|
||||
|
||||
@ -12,7 +12,7 @@ local function _directionElinination(entity, gridEntities, battleController, onl
|
||||
end
|
||||
local direction = effectParams[1]
|
||||
local list = ModuleManager.BattleManager:getPosIdsByDirection(entity:getPosId(), direction)
|
||||
return list
|
||||
return true, list
|
||||
end
|
||||
|
||||
local function _crossSpread(entity, gridEntities, battleController, onlyCheck)
|
||||
|
||||
35
lua/app/ui/battle/battle_box_open_ui.lua
Normal file
35
lua/app/ui/battle/battle_box_open_ui.lua
Normal file
@ -0,0 +1,35 @@
|
||||
local BattleBoxOpenUI = class("BattleBoxOpenUI", BaseUI)
|
||||
|
||||
function BattleBoxOpenUI:isFullScreen()
|
||||
return false
|
||||
end
|
||||
|
||||
function BattleBoxOpenUI:getPrefabPath()
|
||||
return "assets/prefabs/ui/battle/battle_box_open_ui.prefab"
|
||||
end
|
||||
|
||||
function BattleBoxOpenUI:ctor(params)
|
||||
self.rewards = params.rewards
|
||||
self.callback = params.callback
|
||||
end
|
||||
|
||||
function BattleBoxOpenUI:onLoadRootComplete()
|
||||
local uiMap = self.root:genAllChildren()
|
||||
if not self.rewardCell then
|
||||
self.rewardCell = CellManager:addCellComp(uiMap["battle_box_open_ui.reward_cell"], GConst.TYPEOF_LUA_CLASS.REWARD_CELL)
|
||||
end
|
||||
|
||||
local reward = self.rewards[1]
|
||||
if reward then
|
||||
self.rewardCell:refreshByConfig(reward)
|
||||
end
|
||||
|
||||
uiMap["battle_box_open_ui.mask"]:addClickListener(function()
|
||||
self:closeUI()
|
||||
if self.callback then
|
||||
self.callback()
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
return BattleBoxOpenUI
|
||||
10
lua/app/ui/battle/battle_box_open_ui.lua.meta
Normal file
10
lua/app/ui/battle/battle_box_open_ui.lua.meta
Normal file
@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4a9fb63578c42f747a246e6e0c5662e7
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}
|
||||
Loading…
x
Reference in New Issue
Block a user