This commit is contained in:
xiekaidong 2023-04-19 21:03:57 +08:00
commit ce6c6feee3
18 changed files with 161 additions and 131 deletions

View File

@ -2,7 +2,7 @@ local chapter = {
[1]={
["next_chapter"]=2,
["icon"]="chapter_1",
["scenes"]="bg_1",
["scene"]="bg_1",
["board"]={
1
},
@ -77,7 +77,7 @@ local chapter = {
["before_chapter"]=1,
["next_chapter"]=3,
["icon"]="chapter_2",
["scenes"]="bg_2",
["scene"]="bg_2",
["board"]={
2,
3
@ -170,7 +170,7 @@ local chapter = {
["before_chapter"]=2,
["next_chapter"]=4,
["icon"]="chapter_3",
["scenes"]="bg_3",
["scene"]="bg_3",
["board"]={
4,
5,
@ -277,7 +277,7 @@ local chapter = {
["before_chapter"]=3,
["next_chapter"]=5,
["icon"]="chapter_4",
["scenes"]="bg_4",
["scene"]="bg_4",
["board"]={
7,
8,
@ -414,7 +414,7 @@ local chapter = {
["before_chapter"]=4,
["next_chapter"]=6,
["icon"]="chapter_5",
["scenes"]="bg_5",
["scene"]="bg_5",
["board"]={
11,
12,
@ -543,7 +543,7 @@ local chapter = {
["before_chapter"]=5,
["next_chapter"]=7,
["icon"]="chapter_6",
["scenes"]="bg_5",
["scene"]="bg_5",
["board"]={
15,
16,
@ -680,7 +680,7 @@ local chapter = {
["before_chapter"]=6,
["next_chapter"]=8,
["icon"]="chapter_7",
["scenes"]="bg_6",
["scene"]="bg_6",
["board"]={
19,
20,
@ -809,7 +809,7 @@ local chapter = {
["before_chapter"]=7,
["next_chapter"]=9,
["icon"]="chapter_8",
["scenes"]="bg_6",
["scene"]="bg_6",
["board"]={
23,
24,
@ -946,7 +946,7 @@ local chapter = {
["before_chapter"]=8,
["next_chapter"]=10,
["icon"]="chapter_9",
["scenes"]="bg_7",
["scene"]="bg_7",
["board"]={
27,
28,
@ -1074,7 +1074,7 @@ local chapter = {
[10]={
["before_chapter"]=9,
["icon"]="chapter_10",
["scenes"]="bg_7",
["scene"]="bg_7",
["board"]={
31,
32,

View File

@ -4,9 +4,12 @@ local const = {
},
["support_interval"]={
["value"]=500
},
["chapter_cost"]={
["value"]=10
}
}
local config = {
data=const,count=2
data=const,count=3
}
return config

View File

@ -79,11 +79,11 @@ local item = {
}
}
},
[32001]={
[12001]={
["type"]=5,
["parameter"]=32001,
["parameter"]=12001,
["qlt"]=2,
["icon"]="32001"
["icon"]="12001"
},
[22001]={
["type"]=5,
@ -91,23 +91,17 @@ local item = {
["qlt"]=2,
["icon"]="22001"
},
[42001]={
[23001]={
["type"]=5,
["parameter"]=42001,
["qlt"]=2,
["icon"]="42001"
["parameter"]=23001,
["qlt"]=3,
["icon"]="23001"
},
[52001]={
[32001]={
["type"]=5,
["parameter"]=52001,
["parameter"]=32001,
["qlt"]=2,
["icon"]="52001"
},
[12001]={
["type"]=5,
["parameter"]=12001,
["qlt"]=2,
["icon"]="12001"
["icon"]="32001"
},
[33001]={
["type"]=5,
@ -115,17 +109,23 @@ local item = {
["qlt"]=3,
["icon"]="33001"
},
[23001]={
[42001]={
["type"]=5,
["parameter"]=23001,
["qlt"]=3,
["icon"]="23001"
["parameter"]=42001,
["qlt"]=2,
["icon"]="42001"
},
[43001]={
["type"]=5,
["parameter"]=43001,
["qlt"]=3,
["icon"]="43001"
},
[52001]={
["type"]=5,
["parameter"]=52001,
["qlt"]=2,
["icon"]="52001"
}
}
local config = {

View File

@ -1,8 +1,8 @@
local recovery = {
[3]={
["type"]=1,
["time"]=900,
["limit"]=30
["time"]=600,
["limit"]=60
}
}
local config = {

View File

@ -12,37 +12,48 @@ local item = {
["desc"]="闯关需要的当然是体力。"
},
[4]={
["name"]="优秀招式箱"
["name"]="优秀英雄",
["desc"]="可以获得优秀英雄。"
},
[5]={
["name"]="稀有招式箱"
["name"]="稀有英雄",
["desc"]="可以获得稀有英雄。"
},
[6]={
["name"]="史诗招式箱"
},
[32001]={
["name"]="王八拳招式碎片"
},
[22001]={
["name"]="无影腿招式碎片"
},
[42001]={
["name"]="闪电鞭招式碎片"
},
[52001]={
["name"]="金钟罩招式碎片"
["name"]="史诗英雄",
["desc"]="可以获得史诗英雄。"
},
[12001]={
["name"]="大鹏展翅招式碎片"
["name"]="洛克西",
["desc"]="凑齐可解锁或升级。"
},
[33001]={
["name"]="丹田吐纳招式碎片"
[22001]={
["name"]="卡拉",
["desc"]="凑齐可解锁或升级。"
},
[23001]={
["name"]="疾风骤雨招式碎片"
["name"]="巨剑罗伯特",
["desc"]="凑齐可解锁或升级。"
},
[32001]={
["name"]="阿斯克",
["desc"]="凑齐可解锁或升级。"
},
[33001]={
["name"]="艾芙琳",
["desc"]="凑齐可解锁或升级。"
},
[42001]={
["name"]="莉莉丝",
["desc"]="凑齐可解锁或升级。"
},
[43001]={
["name"]="寒冰掌招式碎片"
["name"]="白发凯瑟琳",
["desc"]="凑齐可解锁或升级。"
},
[52001]={
["name"]="艾伦",
["desc"]="凑齐可解锁或升级。"
}
}
local config = {

View File

@ -20,29 +20,29 @@ local item = {
[6]={
},
[32001]={
[12001]={
},
[22001]={
},
[42001]={
[23001]={
},
[52001]={
},
[12001]={
[32001]={
},
[33001]={
},
[23001]={
[42001]={
},
[43001]={
},
[52001]={
}
}
local config = {

View File

@ -20,29 +20,29 @@ local item = {
[6]={
},
[32001]={
[12001]={
},
[22001]={
},
[42001]={
[23001]={
},
[52001]={
},
[12001]={
[32001]={
},
[33001]={
},
[23001]={
[42001]={
},
[43001]={
},
[52001]={
}
}
local config = {

View File

@ -20,29 +20,29 @@ local item = {
[6]={
},
[32001]={
[12001]={
},
[22001]={
},
[42001]={
[23001]={
},
[52001]={
},
[12001]={
[32001]={
},
[33001]={
},
[23001]={
[42001]={
},
[43001]={
},
[52001]={
}
}
local config = {

View File

@ -20,29 +20,29 @@ local item = {
[6]={
},
[32001]={
[12001]={
},
[22001]={
},
[42001]={
[23001]={
},
[52001]={
},
[12001]={
[32001]={
},
[33001]={
},
[23001]={
[42001]={
},
[43001]={
},
[52001]={
}
}
local config = {

View File

@ -20,29 +20,29 @@ local item = {
[6]={
},
[32001]={
[12001]={
},
[22001]={
},
[42001]={
[23001]={
},
[52001]={
},
[12001]={
[32001]={
},
[33001]={
},
[23001]={
[42001]={
},
[43001]={
},
[52001]={
}
}
local config = {

View File

@ -20,29 +20,29 @@ local item = {
[6]={
},
[32001]={
[12001]={
},
[22001]={
},
[42001]={
[23001]={
},
[52001]={
},
[12001]={
[32001]={
},
[33001]={
},
[23001]={
[42001]={
},
[43001]={
},
[52001]={
}
}
local config = {

View File

@ -19,29 +19,29 @@ local item = {
[6]={
},
[32001]={
[12001]={
},
[22001]={
},
[42001]={
[23001]={
},
[52001]={
},
[12001]={
[32001]={
},
[33001]={
},
[23001]={
[42001]={
},
[43001]={
},
[52001]={
}
}
local config = {

View File

@ -17,29 +17,29 @@ local item = {
[6]={
},
[32001]={
[12001]={
},
[22001]={
},
[42001]={
[23001]={
},
[52001]={
},
[12001]={
[32001]={
},
[33001]={
},
[23001]={
[42001]={
},
[43001]={
},
[52001]={
}
}
local config = {

View File

@ -17,29 +17,29 @@ local item = {
[6]={
},
[32001]={
[12001]={
},
[22001]={
},
[42001]={
[23001]={
},
[52001]={
},
[12001]={
[32001]={
},
[33001]={
},
[23001]={
[42001]={
},
[43001]={
},
[52001]={
}
}
local config = {

View File

@ -20,29 +20,29 @@ local item = {
[6]={
},
[32001]={
[12001]={
},
[22001]={
},
[42001]={
[23001]={
},
[52001]={
},
[12001]={
[32001]={
},
[33001]={
},
[23001]={
[42001]={
},
[43001]={
},
[52001]={
}
}
local config = {

View File

@ -20,29 +20,29 @@ local item = {
[6]={
},
[32001]={
[12001]={
},
[22001]={
},
[42001]={
[23001]={
},
[52001]={
},
[12001]={
[32001]={
},
[33001]={
},
[23001]={
[42001]={
},
[43001]={
},
[52001]={
}
}
local config = {

View File

@ -19,6 +19,7 @@ end
function BattleControllerStage:initDefUnits(callback)
local config = ConfigManager:getConfig("chapter")[self.chapterId]
self.battleUI:loadBg(config.scene)
local unitEntity = DataManager.BattleData:addMonster(config.monster[1])
local modelId = unitEntity:getModelId()
BattleHelper:loadBattleHeroModel(modelId, self.battleUI:getBattleNode(), function(spineObject)

View File

@ -6,6 +6,7 @@ local SKILL_NODE_CELL = "app/ui/battle/cell/skill_node_cell"
local DEFAULT_X = 10000
local BOARD_POS_UP = BF.Vector2(0, 47)
local BOARD_POS_DOWN = BF.Vector2(0, -740)
local BG_PATH = "assets/arts/textures/background/battle/%s.png"
function BattleUI:getPrefabPath()
return "assets/prefabs/ui/battle/battle_ui.prefab"
@ -31,6 +32,7 @@ function BattleUI:_display()
self.boardCacheNode = uiMap["battle_ui.bg_2.board_cache_node"]
self.boardCacheNode:setVisible(false)
self.boardCacheBox = uiMap["battle_ui.bg_2.board_cache_node.skill_box"]
self:initBg()
self:initSkill()
self:initBattlefield()
self:initNumberNode()
@ -51,6 +53,19 @@ function BattleUI:_bind()
end, true)
end
function BattleUI:initBg()
self.bg = self.uiMap["battle_ui.bg"]
self.bg:setLocalScale(0, 0, 0)
local width = self.bg:fastGetSizeDelta()
self.bg:setAnchoredPositionX(width/4)
end
function BattleUI:loadBg(bgName)
self.bg:setTexture(string.format(BG_PATH, bgName), function()
self.bg:setLocalScale(1, 1, 1)
end)
end
function BattleUI:initSkill()
if self.skillNodeCells then
return