读表
This commit is contained in:
parent
ac5183c0fe
commit
293facc310
@ -4,7 +4,6 @@ BattleConst.ROW_COUNT = 7
|
||||
BattleConst.COLUMN_COUNT = 7
|
||||
BattleConst.HALF_ROW_COUNT = 4 -- 计算偏移 math.ceil(ROW_COUNT / 2)
|
||||
BattleConst.HALF_COLUMN_COUNT = 4 -- 计算偏移 math.ceil(COLUMN_COUNT / 2)
|
||||
BattleConst.ELIMINATION_MIN_COUNT = 2
|
||||
BattleConst.GRID_STEP_H = 94
|
||||
BattleConst.ROW_STEP = 10
|
||||
BattleConst.ONE_STEP_TIME = 0.2
|
||||
|
||||
@ -52,6 +52,13 @@ function BattleController:getMaxWave()
|
||||
return 1
|
||||
end
|
||||
|
||||
function BattleController:getMinEliminationCount()
|
||||
if not self.minEliminationCount then
|
||||
self.minEliminationCount = GFunc.getConstIntValue("element_combo")
|
||||
end
|
||||
return self.minEliminationCount
|
||||
end
|
||||
|
||||
function BattleController:initDefUnits(callback)
|
||||
callback()
|
||||
end
|
||||
@ -475,7 +482,7 @@ function BattleController:onTouchEvent(eventType, posId)
|
||||
self.battleUI:showBoardMask(nil)
|
||||
local sequence = self.battleData:getGridSequence()
|
||||
local count = #sequence
|
||||
if count < BattleConst.ELIMINATION_MIN_COUNT then
|
||||
if count < self:getMinEliminationCount() then
|
||||
if count <= 0 then
|
||||
self.battleData:clearGridSequence()
|
||||
self:onLinkChange()
|
||||
@ -504,7 +511,7 @@ end
|
||||
function BattleController:onLinkOver()
|
||||
local sequence = self.battleData:getGridSequence()
|
||||
local count = #sequence
|
||||
if count < BattleConst.ELIMINATION_MIN_COUNT then
|
||||
if count < self:getMinEliminationCount() then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user