Merge branch 'dev' of git.juzugame.com:b6-client/b6-lua into dev
This commit is contained in:
commit
ec58c080ad
@ -634,6 +634,13 @@ function UIPrefabObject:setClickAnimation(enable)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function UIPrefabObject:stopClickAnimation()
|
||||||
|
local eventListener = self:getComponent(BF_UI_TOUCH_EVENT)
|
||||||
|
if eventListener then
|
||||||
|
eventListener:StopTouchAnimation()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function UIPrefabObject:setTouchEnable(enable)
|
function UIPrefabObject:setTouchEnable(enable)
|
||||||
local maskableGraphic = self:getComponent(UI_MASKABLE_GRAPHIC)
|
local maskableGraphic = self:getComponent(UI_MASKABLE_GRAPHIC)
|
||||||
if maskableGraphic then
|
if maskableGraphic then
|
||||||
|
|||||||
@ -399,6 +399,37 @@ if NOT_PUBLISH then
|
|||||||
Logger.printTable(map)
|
Logger.printTable(map)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if (Input.GetKeyDown(KeyCode.RightArrow) or Input.GetKeyDown(KeyCode.LeftArrow)) and Input.GetKey(KeyCode.LeftControl) then
|
||||||
|
local configName = ModuleManager.DevToolManager.set_board_info.config
|
||||||
|
local idx = ModuleManager.DevToolManager.set_board_info.idx or 0
|
||||||
|
if not configName then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local config = ConfigManager:getConfig(configName)
|
||||||
|
if Input.GetKeyDown(KeyCode.LeftArrow) then
|
||||||
|
idx = idx - 1
|
||||||
|
else
|
||||||
|
idx = idx + 1
|
||||||
|
end
|
||||||
|
if not config[idx] then
|
||||||
|
Logger.logHighlight(configName .. " 没有id idx = " .. idx)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
Logger.logHighlight(configName .. " 当前 idx = " .. idx)
|
||||||
|
ModuleManager.DevToolManager.set_board_info.idx = idx
|
||||||
|
|
||||||
|
local board = config[idx].board
|
||||||
|
if not board then
|
||||||
|
board = config[idx].board_daily_challenge
|
||||||
|
end
|
||||||
|
|
||||||
|
if ModuleManager.BattleManager:isInBattle() then
|
||||||
|
local battleController = ModuleManager.BattleManager.battleController
|
||||||
|
battleController.battleData:refreshBoard(board, battleController:getBlockIcon())
|
||||||
|
battleController.battleUI:initGridCell()
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
Game._releaseOnApplicationFocus = Game.onApplicationFocus
|
Game._releaseOnApplicationFocus = Game.onApplicationFocus
|
||||||
|
|||||||
@ -1411,10 +1411,12 @@ function BattleUnitComp:onSkillTakeEffect(skill, isFinalBlock, validEffectIdx)
|
|||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if soundHit[soundIndex] and soundHit[soundIndex] > 0 then
|
||||||
BattleHelper:playSkillSound(soundHit[soundIndex], 0)
|
BattleHelper:playSkillSound(soundHit[soundIndex], 0)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleUnitComp:judgeSkillEffectCondition(skill, index)
|
function BattleUnitComp:judgeSkillEffectCondition(skill, index)
|
||||||
|
|||||||
@ -111,5 +111,12 @@ args:技能id
|
|||||||
Example: add_monster_skill 10027]],
|
Example: add_monster_skill 10027]],
|
||||||
type = "add_monster_skill"
|
type = "add_monster_skill"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title = "设置棋盘遍历信息",
|
||||||
|
desc = [[设置棋盘遍历信息type:set_board_info
|
||||||
|
args:棋盘配置表名 起始boardId
|
||||||
|
Example: set_board_info 10027]],
|
||||||
|
type = "set_board_info"
|
||||||
|
},
|
||||||
}
|
}
|
||||||
return GMConst
|
return GMConst
|
||||||
@ -1,5 +1,7 @@
|
|||||||
local MainCityConst = {}
|
local MainCityConst = {}
|
||||||
|
|
||||||
|
MainCityConst.SIDE_BAR_MIN_COUNT = 3
|
||||||
|
|
||||||
MainCityConst.BOTTOM_PAGE = {
|
MainCityConst.BOTTOM_PAGE = {
|
||||||
MAIN = 1,
|
MAIN = 1,
|
||||||
HERO = 2,
|
HERO = 2,
|
||||||
@ -20,6 +22,7 @@ MainCityConst.MAIN_MODULE = {
|
|||||||
|
|
||||||
MainCityConst.LEFT_SIDE_BARS = {
|
MainCityConst.LEFT_SIDE_BARS = {
|
||||||
"app/ui/main_city/cell/side_bar_idle_cell",
|
"app/ui/main_city/cell/side_bar_idle_cell",
|
||||||
|
"app/ui/main_city/cell/side_bar_growth_fund_cell",
|
||||||
"app/ui/main_city/cell/side_bar_seven_days_cell",
|
"app/ui/main_city/cell/side_bar_seven_days_cell",
|
||||||
-- gm放最后一个
|
-- gm放最后一个
|
||||||
"app/ui/main_city/cell/side_bar_gm_cell"
|
"app/ui/main_city/cell/side_bar_gm_cell"
|
||||||
@ -27,7 +30,6 @@ MainCityConst.LEFT_SIDE_BARS = {
|
|||||||
|
|
||||||
MainCityConst.RIGHT_SIDE_BARS = {
|
MainCityConst.RIGHT_SIDE_BARS = {
|
||||||
"app/ui/main_city/cell/side_bar_gold_pig_cell",
|
"app/ui/main_city/cell/side_bar_gold_pig_cell",
|
||||||
"app/ui/main_city/cell/side_bar_growth_fund_cell",
|
|
||||||
"app/ui/main_city/cell/side_bar_first_recharge_cell",
|
"app/ui/main_city/cell/side_bar_first_recharge_cell",
|
||||||
"app/ui/main_city/cell/side_bar_beginner_gift_cell",
|
"app/ui/main_city/cell/side_bar_beginner_gift_cell",
|
||||||
"app/ui/main_city/cell/side_bar_grow_up_gift_1_cell",
|
"app/ui/main_city/cell/side_bar_grow_up_gift_1_cell",
|
||||||
|
|||||||
@ -107,6 +107,12 @@ function GMToolUI:sendMsg(gmCommand)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
self:addMonsterSkill(args.args)
|
self:addMonsterSkill(args.args)
|
||||||
|
elseif args.args[1] == "set_board_info" then -- 特殊处理
|
||||||
|
ModuleManager.DevToolManager.set_board_info = {
|
||||||
|
config = args.args[2],
|
||||||
|
idx = tonumber(args.args[3]) or 0
|
||||||
|
}
|
||||||
|
self:closeUI()
|
||||||
elseif args.args[1] == "time" then -- 特殊处理
|
elseif args.args[1] == "time" then -- 特殊处理
|
||||||
local args1 = {}
|
local args1 = {}
|
||||||
args1.args = {}
|
args1.args = {}
|
||||||
|
|||||||
@ -440,20 +440,26 @@ function MainCityUI:refreshLeftBtns()
|
|||||||
table.insert(self.leftBarList, cell)
|
table.insert(self.leftBarList, cell)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if #self.leftBarList <= 0 then
|
local sideBarShowCount = #self.leftBarList
|
||||||
|
if sideBarShowCount <= 0 then
|
||||||
self.leftNode:setAnchoredPositionX(GConst.NOT_VISIBLE_POS)
|
self.leftNode:setAnchoredPositionX(GConst.NOT_VISIBLE_POS)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
self.leftNode:setAnchoredPositionX(0)
|
self.leftNode:setAnchoredPositionX(0)
|
||||||
local y = -SIDE_BAR_BORDER_OFFSET - self.sideBarHeight/2
|
local y = -SIDE_BAR_BORDER_OFFSET - self.sideBarHeight/2
|
||||||
if isClose then -- 只显示一个
|
if isClose then -- 只显示3个
|
||||||
local first = self.leftBarList[1]
|
local minCount = GConst.MainCityConst.SIDE_BAR_MIN_COUNT
|
||||||
first:setAnchoredPositionY(y)
|
for i = 1, minCount do
|
||||||
first:refresh()
|
local sideBarBtn = self.leftBarList[i]
|
||||||
first:setActive(true)
|
if i <= sideBarShowCount then
|
||||||
first:setVisible(true)
|
sideBarBtn:setAnchoredPositionY(y)
|
||||||
|
sideBarBtn:refresh()
|
||||||
|
sideBarBtn:setActive(true)
|
||||||
|
sideBarBtn:setVisible(true)
|
||||||
y = y - self.sideBarHeight - SIDE_BAR_INTERVAL
|
y = y - self.sideBarHeight - SIDE_BAR_INTERVAL
|
||||||
for i = 2, #self.leftBarList do
|
end
|
||||||
|
end
|
||||||
|
for i = minCount + 1, sideBarShowCount do
|
||||||
self.leftBarList[i]:refresh()
|
self.leftBarList[i]:refresh()
|
||||||
self.leftBarList[i]:setActive(true)
|
self.leftBarList[i]:setActive(true)
|
||||||
self.leftBarList[i]:setVisible(false)
|
self.leftBarList[i]:setVisible(false)
|
||||||
@ -467,11 +473,18 @@ function MainCityUI:refreshLeftBtns()
|
|||||||
y = y - self.sideBarHeight - SIDE_BAR_INTERVAL
|
y = y - self.sideBarHeight - SIDE_BAR_INTERVAL
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if sideBarShowCount <= GConst.MainCityConst.SIDE_BAR_MIN_COUNT then -- 小于3个不显示箭头
|
||||||
|
y = y + self.sideBarHeight / 2
|
||||||
|
self.leftSideBar:setSizeDeltaY(-y)
|
||||||
|
self.leftArrowBtn:stopClickAnimation()
|
||||||
|
self.leftArrowBtn:setVisible(false)
|
||||||
|
else
|
||||||
local arrowHeight = self.leftArrowBtn:getRectHeight()
|
local arrowHeight = self.leftArrowBtn:getRectHeight()
|
||||||
y = y + self.sideBarHeight/2 - SIDE_BAR_ARROW_INTERVAL - arrowHeight
|
y = y + self.sideBarHeight/2 - SIDE_BAR_ARROW_INTERVAL - arrowHeight
|
||||||
self.leftSideBar:setSizeDeltaY(-y)
|
self.leftSideBar:setSizeDeltaY(-y)
|
||||||
self.leftArrowImg:setLocalScale(1, isClose and -1 or 1, 1)
|
self.leftArrowImg:setLocalScale(1, isClose and -1 or 1, 1)
|
||||||
self.leftArrowBtn:setAnchoredPositionY(self.leftSideBar:fastGetAnchoredPositionY() + y + arrowHeight/2 + SIDE_BAR_BORDER_OFFSET)
|
self.leftArrowBtn:setAnchoredPositionY(self.leftSideBar:fastGetAnchoredPositionY() + y + arrowHeight/2 + SIDE_BAR_BORDER_OFFSET)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function MainCityUI:openOrCloseRightSideBar()
|
function MainCityUI:openOrCloseRightSideBar()
|
||||||
@ -506,6 +519,7 @@ function MainCityUI:refreshRightBtns()
|
|||||||
table.insert(self.rightBarList, cell)
|
table.insert(self.rightBarList, cell)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
local sideBarShowCount = #self.rightBarList
|
||||||
if #self.rightBarList <= 0 then
|
if #self.rightBarList <= 0 then
|
||||||
self.rightNode:setAnchoredPositionX(GConst.NOT_VISIBLE_POS)
|
self.rightNode:setAnchoredPositionX(GConst.NOT_VISIBLE_POS)
|
||||||
return
|
return
|
||||||
@ -513,13 +527,18 @@ function MainCityUI:refreshRightBtns()
|
|||||||
self.rightNode:setAnchoredPositionX(0)
|
self.rightNode:setAnchoredPositionX(0)
|
||||||
local y = -SIDE_BAR_BORDER_OFFSET - self.sideBarHeight/2
|
local y = -SIDE_BAR_BORDER_OFFSET - self.sideBarHeight/2
|
||||||
if isClose then -- 只显示一个
|
if isClose then -- 只显示一个
|
||||||
local first = self.rightBarList[1]
|
local minCount = GConst.MainCityConst.SIDE_BAR_MIN_COUNT
|
||||||
first:setAnchoredPositionY(y)
|
for i = 1, minCount do
|
||||||
first:refresh()
|
local sideBarBtn = self.rightBarList[i]
|
||||||
first:setActive(true)
|
if i <= sideBarShowCount then
|
||||||
first:setVisible(true)
|
sideBarBtn:setAnchoredPositionY(y)
|
||||||
|
sideBarBtn:refresh()
|
||||||
|
sideBarBtn:setActive(true)
|
||||||
|
sideBarBtn:setVisible(true)
|
||||||
y = y - self.sideBarHeight - SIDE_BAR_INTERVAL
|
y = y - self.sideBarHeight - SIDE_BAR_INTERVAL
|
||||||
for i = 2, #self.rightBarList do
|
end
|
||||||
|
end
|
||||||
|
for i = minCount + 1, sideBarShowCount do
|
||||||
self.rightBarList[i]:refresh()
|
self.rightBarList[i]:refresh()
|
||||||
self.rightBarList[i]:setActive(true)
|
self.rightBarList[i]:setActive(true)
|
||||||
self.rightBarList[i]:setVisible(false)
|
self.rightBarList[i]:setVisible(false)
|
||||||
@ -533,11 +552,18 @@ function MainCityUI:refreshRightBtns()
|
|||||||
y = y - self.sideBarHeight - SIDE_BAR_INTERVAL
|
y = y - self.sideBarHeight - SIDE_BAR_INTERVAL
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if sideBarShowCount <= GConst.MainCityConst.SIDE_BAR_MIN_COUNT then
|
||||||
|
y = y + self.sideBarHeight / 2
|
||||||
|
self.rightSideBar:setSizeDeltaY(-y)
|
||||||
|
self.rightArrowBtn:stopClickAnimation()
|
||||||
|
self.rightArrowBtn:setVisible(false)
|
||||||
|
else
|
||||||
local arrowHeight = self.rightArrowBtn:getRectHeight()
|
local arrowHeight = self.rightArrowBtn:getRectHeight()
|
||||||
y = y + self.sideBarHeight / 2 - SIDE_BAR_ARROW_INTERVAL - arrowHeight
|
y = y + self.sideBarHeight / 2 - SIDE_BAR_ARROW_INTERVAL - arrowHeight
|
||||||
self.rightSideBar:setSizeDeltaY(-y)
|
self.rightSideBar:setSizeDeltaY(-y)
|
||||||
self.rightArrowImg:setLocalScale(1, isClose and -1 or 1, 1)
|
self.rightArrowImg:setLocalScale(1, isClose and -1 or 1, 1)
|
||||||
self.rightArrowBtn:setAnchoredPositionY(self.rightSideBar:fastGetAnchoredPositionY() + y + arrowHeight/2 + SIDE_BAR_BORDER_OFFSET)
|
self.rightArrowBtn:setAnchoredPositionY(self.rightSideBar:fastGetAnchoredPositionY() + y + arrowHeight/2 + SIDE_BAR_BORDER_OFFSET)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function MainCityUI:clearSideBarList(sideBarList)
|
function MainCityUI:clearSideBarList(sideBarList)
|
||||||
@ -712,15 +738,21 @@ end
|
|||||||
|
|
||||||
function MainCityUI:updateSideBarStatus()
|
function MainCityUI:updateSideBarStatus()
|
||||||
if self.leftBarList then
|
if self.leftBarList then
|
||||||
local first = self.leftBarList[1]
|
local minCount = GConst.MainCityConst.SIDE_BAR_MIN_COUNT
|
||||||
if first then
|
for i = 1, minCount do
|
||||||
if first:getIsShowRedPoint() then
|
local sideBarBtn = self.leftBarList[i]
|
||||||
first:showRedPoint()
|
if sideBarBtn then
|
||||||
|
if sideBarBtn:getIsShowRedPoint() then
|
||||||
|
sideBarBtn:showRedPoint()
|
||||||
else
|
else
|
||||||
first:hideRedPoint()
|
sideBarBtn:hideRedPoint()
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local sideBarCount = #self.leftBarList
|
||||||
|
if sideBarCount > minCount then
|
||||||
local count = 0
|
local count = 0
|
||||||
for i = 2, #self.leftBarList do
|
for i = minCount + 1, sideBarCount do
|
||||||
if self.leftBarList[i]:getIsShowRedPoint() then
|
if self.leftBarList[i]:getIsShowRedPoint() then
|
||||||
self.leftBarList[i]:showRedPoint()
|
self.leftBarList[i]:showRedPoint()
|
||||||
count = count + 1
|
count = count + 1
|
||||||
@ -738,15 +770,21 @@ function MainCityUI:updateSideBarStatus()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if self.rightBarList then
|
if self.rightBarList then
|
||||||
local first = self.rightBarList[1]
|
local minCount = GConst.MainCityConst.SIDE_BAR_MIN_COUNT
|
||||||
if first then
|
for i = 1, minCount do
|
||||||
if first:getIsShowRedPoint() then
|
local sideBarBtn = self.rightBarList[i]
|
||||||
first:showRedPoint()
|
if sideBarBtn then
|
||||||
|
if sideBarBtn:getIsShowRedPoint() then
|
||||||
|
sideBarBtn:showRedPoint()
|
||||||
else
|
else
|
||||||
first:hideRedPoint()
|
sideBarBtn:hideRedPoint()
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local sideBarCount = #self.rightBarList
|
||||||
|
if sideBarCount > minCount then
|
||||||
local count = 0
|
local count = 0
|
||||||
for i = 2, #self.rightBarList do
|
for i = minCount + 1, sideBarCount do
|
||||||
if self.rightBarList[i]:getIsShowRedPoint() then
|
if self.rightBarList[i]:getIsShowRedPoint() then
|
||||||
self.rightBarList[i]:showRedPoint()
|
self.rightBarList[i]:showRedPoint()
|
||||||
count = count + 1
|
count = count + 1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user