更新配置
This commit is contained in:
parent
90070e8798
commit
726e4af821
@ -2,7 +2,7 @@ local chapter = {
|
|||||||
[1]={
|
[1]={
|
||||||
["next_chapter"]=2,
|
["next_chapter"]=2,
|
||||||
["icon"]="chapter_1",
|
["icon"]="chapter_1",
|
||||||
["scenes"]="bg_1",
|
["scene"]="bg_1",
|
||||||
["board"]={
|
["board"]={
|
||||||
1
|
1
|
||||||
},
|
},
|
||||||
@ -77,7 +77,7 @@ local chapter = {
|
|||||||
["before_chapter"]=1,
|
["before_chapter"]=1,
|
||||||
["next_chapter"]=3,
|
["next_chapter"]=3,
|
||||||
["icon"]="chapter_2",
|
["icon"]="chapter_2",
|
||||||
["scenes"]="bg_2",
|
["scene"]="bg_2",
|
||||||
["board"]={
|
["board"]={
|
||||||
2,
|
2,
|
||||||
3
|
3
|
||||||
@ -170,7 +170,7 @@ local chapter = {
|
|||||||
["before_chapter"]=2,
|
["before_chapter"]=2,
|
||||||
["next_chapter"]=4,
|
["next_chapter"]=4,
|
||||||
["icon"]="chapter_3",
|
["icon"]="chapter_3",
|
||||||
["scenes"]="bg_3",
|
["scene"]="bg_3",
|
||||||
["board"]={
|
["board"]={
|
||||||
4,
|
4,
|
||||||
5,
|
5,
|
||||||
@ -277,7 +277,7 @@ local chapter = {
|
|||||||
["before_chapter"]=3,
|
["before_chapter"]=3,
|
||||||
["next_chapter"]=5,
|
["next_chapter"]=5,
|
||||||
["icon"]="chapter_4",
|
["icon"]="chapter_4",
|
||||||
["scenes"]="bg_4",
|
["scene"]="bg_4",
|
||||||
["board"]={
|
["board"]={
|
||||||
7,
|
7,
|
||||||
8,
|
8,
|
||||||
@ -414,7 +414,7 @@ local chapter = {
|
|||||||
["before_chapter"]=4,
|
["before_chapter"]=4,
|
||||||
["next_chapter"]=6,
|
["next_chapter"]=6,
|
||||||
["icon"]="chapter_5",
|
["icon"]="chapter_5",
|
||||||
["scenes"]="bg_5",
|
["scene"]="bg_5",
|
||||||
["board"]={
|
["board"]={
|
||||||
11,
|
11,
|
||||||
12,
|
12,
|
||||||
@ -543,7 +543,7 @@ local chapter = {
|
|||||||
["before_chapter"]=5,
|
["before_chapter"]=5,
|
||||||
["next_chapter"]=7,
|
["next_chapter"]=7,
|
||||||
["icon"]="chapter_6",
|
["icon"]="chapter_6",
|
||||||
["scenes"]="bg_5",
|
["scene"]="bg_5",
|
||||||
["board"]={
|
["board"]={
|
||||||
15,
|
15,
|
||||||
16,
|
16,
|
||||||
@ -680,7 +680,7 @@ local chapter = {
|
|||||||
["before_chapter"]=6,
|
["before_chapter"]=6,
|
||||||
["next_chapter"]=8,
|
["next_chapter"]=8,
|
||||||
["icon"]="chapter_7",
|
["icon"]="chapter_7",
|
||||||
["scenes"]="bg_6",
|
["scene"]="bg_6",
|
||||||
["board"]={
|
["board"]={
|
||||||
19,
|
19,
|
||||||
20,
|
20,
|
||||||
@ -809,7 +809,7 @@ local chapter = {
|
|||||||
["before_chapter"]=7,
|
["before_chapter"]=7,
|
||||||
["next_chapter"]=9,
|
["next_chapter"]=9,
|
||||||
["icon"]="chapter_8",
|
["icon"]="chapter_8",
|
||||||
["scenes"]="bg_6",
|
["scene"]="bg_6",
|
||||||
["board"]={
|
["board"]={
|
||||||
23,
|
23,
|
||||||
24,
|
24,
|
||||||
@ -946,7 +946,7 @@ local chapter = {
|
|||||||
["before_chapter"]=8,
|
["before_chapter"]=8,
|
||||||
["next_chapter"]=10,
|
["next_chapter"]=10,
|
||||||
["icon"]="chapter_9",
|
["icon"]="chapter_9",
|
||||||
["scenes"]="bg_7",
|
["scene"]="bg_7",
|
||||||
["board"]={
|
["board"]={
|
||||||
27,
|
27,
|
||||||
28,
|
28,
|
||||||
@ -1074,7 +1074,7 @@ local chapter = {
|
|||||||
[10]={
|
[10]={
|
||||||
["before_chapter"]=9,
|
["before_chapter"]=9,
|
||||||
["icon"]="chapter_10",
|
["icon"]="chapter_10",
|
||||||
["scenes"]="bg_7",
|
["scene"]="bg_7",
|
||||||
["board"]={
|
["board"]={
|
||||||
31,
|
31,
|
||||||
32,
|
32,
|
||||||
|
|||||||
@ -4,9 +4,12 @@ local const = {
|
|||||||
},
|
},
|
||||||
["support_interval"]={
|
["support_interval"]={
|
||||||
["value"]=500
|
["value"]=500
|
||||||
|
},
|
||||||
|
["chapter_cost"]={
|
||||||
|
["value"]=10
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
local config = {
|
local config = {
|
||||||
data=const,count=2
|
data=const,count=3
|
||||||
}
|
}
|
||||||
return config
|
return config
|
||||||
@ -79,11 +79,11 @@ local item = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[32001]={
|
[12001]={
|
||||||
["type"]=5,
|
["type"]=5,
|
||||||
["parameter"]=32001,
|
["parameter"]=12001,
|
||||||
["qlt"]=2,
|
["qlt"]=2,
|
||||||
["icon"]="32001"
|
["icon"]="12001"
|
||||||
},
|
},
|
||||||
[22001]={
|
[22001]={
|
||||||
["type"]=5,
|
["type"]=5,
|
||||||
@ -91,23 +91,17 @@ local item = {
|
|||||||
["qlt"]=2,
|
["qlt"]=2,
|
||||||
["icon"]="22001"
|
["icon"]="22001"
|
||||||
},
|
},
|
||||||
[42001]={
|
[23001]={
|
||||||
["type"]=5,
|
["type"]=5,
|
||||||
["parameter"]=42001,
|
["parameter"]=23001,
|
||||||
["qlt"]=2,
|
["qlt"]=3,
|
||||||
["icon"]="42001"
|
["icon"]="23001"
|
||||||
},
|
},
|
||||||
[52001]={
|
[32001]={
|
||||||
["type"]=5,
|
["type"]=5,
|
||||||
["parameter"]=52001,
|
["parameter"]=32001,
|
||||||
["qlt"]=2,
|
["qlt"]=2,
|
||||||
["icon"]="52001"
|
["icon"]="32001"
|
||||||
},
|
|
||||||
[12001]={
|
|
||||||
["type"]=5,
|
|
||||||
["parameter"]=12001,
|
|
||||||
["qlt"]=2,
|
|
||||||
["icon"]="12001"
|
|
||||||
},
|
},
|
||||||
[33001]={
|
[33001]={
|
||||||
["type"]=5,
|
["type"]=5,
|
||||||
@ -115,17 +109,23 @@ local item = {
|
|||||||
["qlt"]=3,
|
["qlt"]=3,
|
||||||
["icon"]="33001"
|
["icon"]="33001"
|
||||||
},
|
},
|
||||||
[23001]={
|
[42001]={
|
||||||
["type"]=5,
|
["type"]=5,
|
||||||
["parameter"]=23001,
|
["parameter"]=42001,
|
||||||
["qlt"]=3,
|
["qlt"]=2,
|
||||||
["icon"]="23001"
|
["icon"]="42001"
|
||||||
},
|
},
|
||||||
[43001]={
|
[43001]={
|
||||||
["type"]=5,
|
["type"]=5,
|
||||||
["parameter"]=43001,
|
["parameter"]=43001,
|
||||||
["qlt"]=3,
|
["qlt"]=3,
|
||||||
["icon"]="43001"
|
["icon"]="43001"
|
||||||
|
},
|
||||||
|
[52001]={
|
||||||
|
["type"]=5,
|
||||||
|
["parameter"]=52001,
|
||||||
|
["qlt"]=2,
|
||||||
|
["icon"]="52001"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
local config = {
|
local config = {
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
local recovery = {
|
local recovery = {
|
||||||
[3]={
|
[3]={
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["time"]=900,
|
["time"]=600,
|
||||||
["limit"]=30
|
["limit"]=60
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
local config = {
|
local config = {
|
||||||
|
|||||||
@ -12,37 +12,48 @@ local item = {
|
|||||||
["desc"]="闯关需要的当然是体力。"
|
["desc"]="闯关需要的当然是体力。"
|
||||||
},
|
},
|
||||||
[4]={
|
[4]={
|
||||||
["name"]="优秀招式箱"
|
["name"]="优秀英雄",
|
||||||
|
["desc"]="可以获得优秀英雄。"
|
||||||
},
|
},
|
||||||
[5]={
|
[5]={
|
||||||
["name"]="稀有招式箱"
|
["name"]="稀有英雄",
|
||||||
|
["desc"]="可以获得稀有英雄。"
|
||||||
},
|
},
|
||||||
[6]={
|
[6]={
|
||||||
["name"]="史诗招式箱"
|
["name"]="史诗英雄",
|
||||||
},
|
["desc"]="可以获得史诗英雄。"
|
||||||
[32001]={
|
|
||||||
["name"]="王八拳招式碎片"
|
|
||||||
},
|
|
||||||
[22001]={
|
|
||||||
["name"]="无影腿招式碎片"
|
|
||||||
},
|
|
||||||
[42001]={
|
|
||||||
["name"]="闪电鞭招式碎片"
|
|
||||||
},
|
|
||||||
[52001]={
|
|
||||||
["name"]="金钟罩招式碎片"
|
|
||||||
},
|
},
|
||||||
[12001]={
|
[12001]={
|
||||||
["name"]="大鹏展翅招式碎片"
|
["name"]="洛克西",
|
||||||
|
["desc"]="凑齐可解锁或升级。"
|
||||||
},
|
},
|
||||||
[33001]={
|
[22001]={
|
||||||
["name"]="丹田吐纳招式碎片"
|
["name"]="卡拉",
|
||||||
|
["desc"]="凑齐可解锁或升级。"
|
||||||
},
|
},
|
||||||
[23001]={
|
[23001]={
|
||||||
["name"]="疾风骤雨招式碎片"
|
["name"]="巨剑罗伯特",
|
||||||
|
["desc"]="凑齐可解锁或升级。"
|
||||||
|
},
|
||||||
|
[32001]={
|
||||||
|
["name"]="阿斯克",
|
||||||
|
["desc"]="凑齐可解锁或升级。"
|
||||||
|
},
|
||||||
|
[33001]={
|
||||||
|
["name"]="艾芙琳",
|
||||||
|
["desc"]="凑齐可解锁或升级。"
|
||||||
|
},
|
||||||
|
[42001]={
|
||||||
|
["name"]="莉莉丝",
|
||||||
|
["desc"]="凑齐可解锁或升级。"
|
||||||
},
|
},
|
||||||
[43001]={
|
[43001]={
|
||||||
["name"]="寒冰掌招式碎片"
|
["name"]="白发凯瑟琳",
|
||||||
|
["desc"]="凑齐可解锁或升级。"
|
||||||
|
},
|
||||||
|
[52001]={
|
||||||
|
["name"]="艾伦",
|
||||||
|
["desc"]="凑齐可解锁或升级。"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
local config = {
|
local config = {
|
||||||
|
|||||||
@ -20,29 +20,29 @@ local item = {
|
|||||||
[6]={
|
[6]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[32001]={
|
[12001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[22001]={
|
[22001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[42001]={
|
[23001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[52001]={
|
[32001]={
|
||||||
|
|
||||||
},
|
|
||||||
[12001]={
|
|
||||||
|
|
||||||
},
|
},
|
||||||
[33001]={
|
[33001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[23001]={
|
[42001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[43001]={
|
[43001]={
|
||||||
|
|
||||||
|
},
|
||||||
|
[52001]={
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
local config = {
|
local config = {
|
||||||
|
|||||||
@ -20,29 +20,29 @@ local item = {
|
|||||||
[6]={
|
[6]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[32001]={
|
[12001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[22001]={
|
[22001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[42001]={
|
[23001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[52001]={
|
[32001]={
|
||||||
|
|
||||||
},
|
|
||||||
[12001]={
|
|
||||||
|
|
||||||
},
|
},
|
||||||
[33001]={
|
[33001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[23001]={
|
[42001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[43001]={
|
[43001]={
|
||||||
|
|
||||||
|
},
|
||||||
|
[52001]={
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
local config = {
|
local config = {
|
||||||
|
|||||||
@ -20,29 +20,29 @@ local item = {
|
|||||||
[6]={
|
[6]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[32001]={
|
[12001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[22001]={
|
[22001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[42001]={
|
[23001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[52001]={
|
[32001]={
|
||||||
|
|
||||||
},
|
|
||||||
[12001]={
|
|
||||||
|
|
||||||
},
|
},
|
||||||
[33001]={
|
[33001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[23001]={
|
[42001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[43001]={
|
[43001]={
|
||||||
|
|
||||||
|
},
|
||||||
|
[52001]={
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
local config = {
|
local config = {
|
||||||
|
|||||||
@ -20,29 +20,29 @@ local item = {
|
|||||||
[6]={
|
[6]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[32001]={
|
[12001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[22001]={
|
[22001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[42001]={
|
[23001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[52001]={
|
[32001]={
|
||||||
|
|
||||||
},
|
|
||||||
[12001]={
|
|
||||||
|
|
||||||
},
|
},
|
||||||
[33001]={
|
[33001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[23001]={
|
[42001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[43001]={
|
[43001]={
|
||||||
|
|
||||||
|
},
|
||||||
|
[52001]={
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
local config = {
|
local config = {
|
||||||
|
|||||||
@ -20,29 +20,29 @@ local item = {
|
|||||||
[6]={
|
[6]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[32001]={
|
[12001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[22001]={
|
[22001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[42001]={
|
[23001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[52001]={
|
[32001]={
|
||||||
|
|
||||||
},
|
|
||||||
[12001]={
|
|
||||||
|
|
||||||
},
|
},
|
||||||
[33001]={
|
[33001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[23001]={
|
[42001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[43001]={
|
[43001]={
|
||||||
|
|
||||||
|
},
|
||||||
|
[52001]={
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
local config = {
|
local config = {
|
||||||
|
|||||||
@ -20,29 +20,29 @@ local item = {
|
|||||||
[6]={
|
[6]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[32001]={
|
[12001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[22001]={
|
[22001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[42001]={
|
[23001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[52001]={
|
[32001]={
|
||||||
|
|
||||||
},
|
|
||||||
[12001]={
|
|
||||||
|
|
||||||
},
|
},
|
||||||
[33001]={
|
[33001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[23001]={
|
[42001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[43001]={
|
[43001]={
|
||||||
|
|
||||||
|
},
|
||||||
|
[52001]={
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
local config = {
|
local config = {
|
||||||
|
|||||||
@ -19,29 +19,29 @@ local item = {
|
|||||||
[6]={
|
[6]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[32001]={
|
[12001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[22001]={
|
[22001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[42001]={
|
[23001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[52001]={
|
[32001]={
|
||||||
|
|
||||||
},
|
|
||||||
[12001]={
|
|
||||||
|
|
||||||
},
|
},
|
||||||
[33001]={
|
[33001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[23001]={
|
[42001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[43001]={
|
[43001]={
|
||||||
|
|
||||||
|
},
|
||||||
|
[52001]={
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
local config = {
|
local config = {
|
||||||
|
|||||||
@ -17,29 +17,29 @@ local item = {
|
|||||||
[6]={
|
[6]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[32001]={
|
[12001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[22001]={
|
[22001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[42001]={
|
[23001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[52001]={
|
[32001]={
|
||||||
|
|
||||||
},
|
|
||||||
[12001]={
|
|
||||||
|
|
||||||
},
|
},
|
||||||
[33001]={
|
[33001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[23001]={
|
[42001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[43001]={
|
[43001]={
|
||||||
|
|
||||||
|
},
|
||||||
|
[52001]={
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
local config = {
|
local config = {
|
||||||
|
|||||||
@ -17,29 +17,29 @@ local item = {
|
|||||||
[6]={
|
[6]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[32001]={
|
[12001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[22001]={
|
[22001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[42001]={
|
[23001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[52001]={
|
[32001]={
|
||||||
|
|
||||||
},
|
|
||||||
[12001]={
|
|
||||||
|
|
||||||
},
|
},
|
||||||
[33001]={
|
[33001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[23001]={
|
[42001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[43001]={
|
[43001]={
|
||||||
|
|
||||||
|
},
|
||||||
|
[52001]={
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
local config = {
|
local config = {
|
||||||
|
|||||||
@ -20,29 +20,29 @@ local item = {
|
|||||||
[6]={
|
[6]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[32001]={
|
[12001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[22001]={
|
[22001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[42001]={
|
[23001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[52001]={
|
[32001]={
|
||||||
|
|
||||||
},
|
|
||||||
[12001]={
|
|
||||||
|
|
||||||
},
|
},
|
||||||
[33001]={
|
[33001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[23001]={
|
[42001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[43001]={
|
[43001]={
|
||||||
|
|
||||||
|
},
|
||||||
|
[52001]={
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
local config = {
|
local config = {
|
||||||
|
|||||||
@ -20,29 +20,29 @@ local item = {
|
|||||||
[6]={
|
[6]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[32001]={
|
[12001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[22001]={
|
[22001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[42001]={
|
[23001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[52001]={
|
[32001]={
|
||||||
|
|
||||||
},
|
|
||||||
[12001]={
|
|
||||||
|
|
||||||
},
|
},
|
||||||
[33001]={
|
[33001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[23001]={
|
[42001]={
|
||||||
|
|
||||||
},
|
},
|
||||||
[43001]={
|
[43001]={
|
||||||
|
|
||||||
|
},
|
||||||
|
[52001]={
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
local config = {
|
local config = {
|
||||||
|
|||||||
@ -19,6 +19,7 @@ end
|
|||||||
|
|
||||||
function BattleControllerStage:initDefUnits(callback)
|
function BattleControllerStage:initDefUnits(callback)
|
||||||
local config = ConfigManager:getConfig("chapter")[self.chapterId]
|
local config = ConfigManager:getConfig("chapter")[self.chapterId]
|
||||||
|
self.battleUI:loadBg(config.scene)
|
||||||
local unitEntity = DataManager.BattleData:addMonster(config.monster[1])
|
local unitEntity = DataManager.BattleData:addMonster(config.monster[1])
|
||||||
local modelId = unitEntity:getModelId()
|
local modelId = unitEntity:getModelId()
|
||||||
BattleHelper:loadBattleHeroModel(modelId, self.battleUI:getBattleNode(), function(spineObject)
|
BattleHelper:loadBattleHeroModel(modelId, self.battleUI:getBattleNode(), function(spineObject)
|
||||||
|
|||||||
@ -6,6 +6,7 @@ local SKILL_NODE_CELL = "app/ui/battle/cell/skill_node_cell"
|
|||||||
local DEFAULT_X = 10000
|
local DEFAULT_X = 10000
|
||||||
local BOARD_POS_UP = BF.Vector2(0, 47)
|
local BOARD_POS_UP = BF.Vector2(0, 47)
|
||||||
local BOARD_POS_DOWN = BF.Vector2(0, -740)
|
local BOARD_POS_DOWN = BF.Vector2(0, -740)
|
||||||
|
local BG_PATH = "assets/arts/textures/background/battle/%s.png"
|
||||||
|
|
||||||
function BattleUI:getPrefabPath()
|
function BattleUI:getPrefabPath()
|
||||||
return "assets/prefabs/ui/battle/battle_ui.prefab"
|
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 = uiMap["battle_ui.bg_2.board_cache_node"]
|
||||||
self.boardCacheNode:setVisible(false)
|
self.boardCacheNode:setVisible(false)
|
||||||
self.boardCacheBox = uiMap["battle_ui.bg_2.board_cache_node.skill_box"]
|
self.boardCacheBox = uiMap["battle_ui.bg_2.board_cache_node.skill_box"]
|
||||||
|
self:initBg()
|
||||||
self:initSkill()
|
self:initSkill()
|
||||||
self:initBattlefield()
|
self:initBattlefield()
|
||||||
self:initNumberNode()
|
self:initNumberNode()
|
||||||
@ -50,7 +52,20 @@ function BattleUI:_bind()
|
|||||||
self:refreshLv()
|
self:refreshLv()
|
||||||
end, true)
|
end, true)
|
||||||
end
|
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()
|
function BattleUI:initSkill()
|
||||||
if self.skillNodeCells then
|
if self.skillNodeCells then
|
||||||
return
|
return
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user