diff --git a/lua/app/config/chapter.lua b/lua/app/config/chapter.lua index d2769143..36339ead 100644 --- a/lua/app/config/chapter.lua +++ b/lua/app/config/chapter.lua @@ -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, diff --git a/lua/app/config/const.lua b/lua/app/config/const.lua index 92df87dd..2982578a 100644 --- a/lua/app/config/const.lua +++ b/lua/app/config/const.lua @@ -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 \ No newline at end of file diff --git a/lua/app/config/item.lua b/lua/app/config/item.lua index e39f7e3f..e988e07c 100644 --- a/lua/app/config/item.lua +++ b/lua/app/config/item.lua @@ -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 = { diff --git a/lua/app/config/recovery.lua b/lua/app/config/recovery.lua index ad3119b2..2aa2e91b 100644 --- a/lua/app/config/recovery.lua +++ b/lua/app/config/recovery.lua @@ -1,8 +1,8 @@ local recovery = { [3]={ ["type"]=1, - ["time"]=900, - ["limit"]=30 + ["time"]=600, + ["limit"]=60 } } local config = { diff --git a/lua/app/config/strings/cn/item.lua b/lua/app/config/strings/cn/item.lua index 5120f7ab..5e9137c6 100644 --- a/lua/app/config/strings/cn/item.lua +++ b/lua/app/config/strings/cn/item.lua @@ -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 = { diff --git a/lua/app/config/strings/de/item.lua b/lua/app/config/strings/de/item.lua index 18e52a2b..bf76d4ba 100644 --- a/lua/app/config/strings/de/item.lua +++ b/lua/app/config/strings/de/item.lua @@ -20,29 +20,29 @@ local item = { [6]={ }, - [32001]={ + [12001]={ }, [22001]={ }, - [42001]={ + [23001]={ }, - [52001]={ - - }, - [12001]={ + [32001]={ }, [33001]={ }, - [23001]={ + [42001]={ }, [43001]={ + }, + [52001]={ + } } local config = { diff --git a/lua/app/config/strings/en/item.lua b/lua/app/config/strings/en/item.lua index 481a9403..7a541c86 100644 --- a/lua/app/config/strings/en/item.lua +++ b/lua/app/config/strings/en/item.lua @@ -20,29 +20,29 @@ local item = { [6]={ }, - [32001]={ + [12001]={ }, [22001]={ }, - [42001]={ + [23001]={ }, - [52001]={ - - }, - [12001]={ + [32001]={ }, [33001]={ }, - [23001]={ + [42001]={ }, [43001]={ + }, + [52001]={ + } } local config = { diff --git a/lua/app/config/strings/fr/item.lua b/lua/app/config/strings/fr/item.lua index c9a55b66..08e1088c 100644 --- a/lua/app/config/strings/fr/item.lua +++ b/lua/app/config/strings/fr/item.lua @@ -20,29 +20,29 @@ local item = { [6]={ }, - [32001]={ + [12001]={ }, [22001]={ }, - [42001]={ + [23001]={ }, - [52001]={ - - }, - [12001]={ + [32001]={ }, [33001]={ }, - [23001]={ + [42001]={ }, [43001]={ + }, + [52001]={ + } } local config = { diff --git a/lua/app/config/strings/id/item.lua b/lua/app/config/strings/id/item.lua index 6ed03a59..da41fab0 100644 --- a/lua/app/config/strings/id/item.lua +++ b/lua/app/config/strings/id/item.lua @@ -20,29 +20,29 @@ local item = { [6]={ }, - [32001]={ + [12001]={ }, [22001]={ }, - [42001]={ + [23001]={ }, - [52001]={ - - }, - [12001]={ + [32001]={ }, [33001]={ }, - [23001]={ + [42001]={ }, [43001]={ + }, + [52001]={ + } } local config = { diff --git a/lua/app/config/strings/ja/item.lua b/lua/app/config/strings/ja/item.lua index 8756474e..e4c19683 100644 --- a/lua/app/config/strings/ja/item.lua +++ b/lua/app/config/strings/ja/item.lua @@ -20,29 +20,29 @@ local item = { [6]={ }, - [32001]={ + [12001]={ }, [22001]={ }, - [42001]={ + [23001]={ }, - [52001]={ - - }, - [12001]={ + [32001]={ }, [33001]={ }, - [23001]={ + [42001]={ }, [43001]={ + }, + [52001]={ + } } local config = { diff --git a/lua/app/config/strings/ko/item.lua b/lua/app/config/strings/ko/item.lua index 8b05342c..d6a06409 100644 --- a/lua/app/config/strings/ko/item.lua +++ b/lua/app/config/strings/ko/item.lua @@ -20,29 +20,29 @@ local item = { [6]={ }, - [32001]={ + [12001]={ }, [22001]={ }, - [42001]={ + [23001]={ }, - [52001]={ - - }, - [12001]={ + [32001]={ }, [33001]={ }, - [23001]={ + [42001]={ }, [43001]={ + }, + [52001]={ + } } local config = { diff --git a/lua/app/config/strings/pt/item.lua b/lua/app/config/strings/pt/item.lua index c704ec00..820447e5 100644 --- a/lua/app/config/strings/pt/item.lua +++ b/lua/app/config/strings/pt/item.lua @@ -19,29 +19,29 @@ local item = { [6]={ }, - [32001]={ + [12001]={ }, [22001]={ }, - [42001]={ + [23001]={ }, - [52001]={ - - }, - [12001]={ + [32001]={ }, [33001]={ }, - [23001]={ + [42001]={ }, [43001]={ + }, + [52001]={ + } } local config = { diff --git a/lua/app/config/strings/ru/item.lua b/lua/app/config/strings/ru/item.lua index 1b799a09..8e5b2364 100644 --- a/lua/app/config/strings/ru/item.lua +++ b/lua/app/config/strings/ru/item.lua @@ -17,29 +17,29 @@ local item = { [6]={ }, - [32001]={ + [12001]={ }, [22001]={ }, - [42001]={ + [23001]={ }, - [52001]={ - - }, - [12001]={ + [32001]={ }, [33001]={ }, - [23001]={ + [42001]={ }, [43001]={ + }, + [52001]={ + } } local config = { diff --git a/lua/app/config/strings/th/item.lua b/lua/app/config/strings/th/item.lua index 1b799a09..8e5b2364 100644 --- a/lua/app/config/strings/th/item.lua +++ b/lua/app/config/strings/th/item.lua @@ -17,29 +17,29 @@ local item = { [6]={ }, - [32001]={ + [12001]={ }, [22001]={ }, - [42001]={ + [23001]={ }, - [52001]={ - - }, - [12001]={ + [32001]={ }, [33001]={ }, - [23001]={ + [42001]={ }, [43001]={ + }, + [52001]={ + } } local config = { diff --git a/lua/app/config/strings/vi/item.lua b/lua/app/config/strings/vi/item.lua index 3c815eb3..f646c2c7 100644 --- a/lua/app/config/strings/vi/item.lua +++ b/lua/app/config/strings/vi/item.lua @@ -20,29 +20,29 @@ local item = { [6]={ }, - [32001]={ + [12001]={ }, [22001]={ }, - [42001]={ + [23001]={ }, - [52001]={ - - }, - [12001]={ + [32001]={ }, [33001]={ }, - [23001]={ + [42001]={ }, [43001]={ + }, + [52001]={ + } } local config = { diff --git a/lua/app/config/strings/zh/item.lua b/lua/app/config/strings/zh/item.lua index 69b06456..e687e363 100644 --- a/lua/app/config/strings/zh/item.lua +++ b/lua/app/config/strings/zh/item.lua @@ -20,29 +20,29 @@ local item = { [6]={ }, - [32001]={ + [12001]={ }, [22001]={ }, - [42001]={ + [23001]={ }, - [52001]={ - - }, - [12001]={ + [32001]={ }, [33001]={ }, - [23001]={ + [42001]={ }, [43001]={ + }, + [52001]={ + } } local config = { diff --git a/lua/app/module/battle/controller/battle_controller_stage.lua b/lua/app/module/battle/controller/battle_controller_stage.lua index 45917ba7..21f0ebd8 100644 --- a/lua/app/module/battle/controller/battle_controller_stage.lua +++ b/lua/app/module/battle/controller/battle_controller_stage.lua @@ -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) diff --git a/lua/app/ui/battle/battle_ui.lua b/lua/app/ui/battle/battle_ui.lua index 42e5649d..76065c31 100644 --- a/lua/app/ui/battle/battle_ui.lua +++ b/lua/app/ui/battle/battle_ui.lua @@ -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() @@ -50,7 +52,20 @@ function BattleUI:_bind() self:refreshLv() 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