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