Merge branch 'dev' of http://git.juzugame.com/b6-client/b6-lua into dev
# Conflicts: # lua/app/config/tutorial.lua
This commit is contained in:
commit
5dc6d24503
@ -1,34 +1,6 @@
|
|||||||
local chapter_board = {
|
local chapter_board = {
|
||||||
[1]={
|
[1]={
|
||||||
["board"]={
|
["board"]={
|
||||||
{
|
|
||||||
1,
|
|
||||||
0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
1,
|
|
||||||
0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
0,
|
|
||||||
3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
0,
|
|
||||||
2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
0,
|
|
||||||
2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
1,
|
|
||||||
0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
1,
|
|
||||||
0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
1,
|
1,
|
||||||
0
|
0
|
||||||
@ -43,36 +15,36 @@ local chapter_board = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
0,
|
0,
|
||||||
3
|
2
|
||||||
},
|
|
||||||
{
|
|
||||||
0,
|
|
||||||
3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
1,
|
|
||||||
0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
1,
|
|
||||||
0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
1,
|
|
||||||
0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
1,
|
|
||||||
0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
0,
|
|
||||||
3
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
0,
|
0,
|
||||||
2
|
2
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
1,
|
||||||
|
0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
1,
|
||||||
|
0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
1,
|
||||||
|
0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
1,
|
||||||
|
0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
0,
|
||||||
|
3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
0,
|
||||||
|
4
|
||||||
|
},
|
||||||
{
|
{
|
||||||
0,
|
0,
|
||||||
4
|
4
|
||||||
@ -121,6 +93,34 @@ local chapter_board = {
|
|||||||
1,
|
1,
|
||||||
0
|
0
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
0,
|
||||||
|
3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
0,
|
||||||
|
2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
0,
|
||||||
|
4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
1,
|
||||||
|
0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
1,
|
||||||
|
0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
1,
|
||||||
|
0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
1,
|
||||||
|
0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
1,
|
1,
|
||||||
0
|
0
|
||||||
@ -210,6 +210,7 @@ local chapter_board = {
|
|||||||
2,
|
2,
|
||||||
2,
|
2,
|
||||||
2,
|
2,
|
||||||
|
2,
|
||||||
2
|
2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -63,6 +63,18 @@ local fx = {
|
|||||||
["res"]="sfx_m10016_b03",
|
["res"]="sfx_m10016_b03",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
|
[100016]={
|
||||||
|
["res"]="sfx_m10008_b01",
|
||||||
|
["bind"]="root"
|
||||||
|
},
|
||||||
|
[100017]={
|
||||||
|
["res"]="sfx_m10008_b02",
|
||||||
|
["bind"]="root"
|
||||||
|
},
|
||||||
|
[100018]={
|
||||||
|
["res"]="sfx_m10008_b03",
|
||||||
|
["bind"]="root"
|
||||||
|
},
|
||||||
[200000]={
|
[200000]={
|
||||||
["res"]="sfx_m20001_b01",
|
["res"]="sfx_m20001_b01",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
@ -357,6 +369,6 @@ local fx = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
local config = {
|
local config = {
|
||||||
data=fx,count=89
|
data=fx,count=92
|
||||||
}
|
}
|
||||||
return config
|
return config
|
||||||
@ -2,10 +2,15 @@ local hero = {
|
|||||||
[12001]={
|
[12001]={
|
||||||
["position"]=1,
|
["position"]=1,
|
||||||
["qlt"]=2,
|
["qlt"]=2,
|
||||||
["hurt_skill"]=1,
|
["hurt_skill"]={
|
||||||
|
1200111,
|
||||||
|
1200112,
|
||||||
|
1200113,
|
||||||
|
1200114
|
||||||
|
},
|
||||||
["hurt_num"]=3,
|
["hurt_num"]=3,
|
||||||
["base_skill"]=120011,
|
["base_skill"]=1200120,
|
||||||
["support_skill"]=120010,
|
["support_skill"]=1200110,
|
||||||
["rouge_skill"]=200500,
|
["rouge_skill"]=200500,
|
||||||
["rouge_skill_1"]=200501,
|
["rouge_skill_1"]=200501,
|
||||||
["rouge_skill_2"]=200502,
|
["rouge_skill_2"]=200502,
|
||||||
@ -53,10 +58,15 @@ local hero = {
|
|||||||
[22001]={
|
[22001]={
|
||||||
["position"]=2,
|
["position"]=2,
|
||||||
["qlt"]=2,
|
["qlt"]=2,
|
||||||
["hurt_skill"]=2,
|
["hurt_skill"]={
|
||||||
|
2200111,
|
||||||
|
2200112,
|
||||||
|
2200113,
|
||||||
|
2200114
|
||||||
|
},
|
||||||
["hurt_num"]=3,
|
["hurt_num"]=3,
|
||||||
["base_skill"]=220011,
|
["base_skill"]=2200120,
|
||||||
["support_skill"]=220010,
|
["support_skill"]=2200110,
|
||||||
["rouge_skill"]=200200,
|
["rouge_skill"]=200200,
|
||||||
["rouge_skill_1"]=200201,
|
["rouge_skill_1"]=200201,
|
||||||
["rouge_skill_2"]=200202,
|
["rouge_skill_2"]=200202,
|
||||||
@ -104,10 +114,15 @@ local hero = {
|
|||||||
[23001]={
|
[23001]={
|
||||||
["position"]=2,
|
["position"]=2,
|
||||||
["qlt"]=3,
|
["qlt"]=3,
|
||||||
["hurt_skill"]=2,
|
["hurt_skill"]={
|
||||||
|
2300111,
|
||||||
|
2300112,
|
||||||
|
2300113,
|
||||||
|
2300114
|
||||||
|
},
|
||||||
["hurt_num"]=3,
|
["hurt_num"]=3,
|
||||||
["base_skill"]=230011,
|
["base_skill"]=2300120,
|
||||||
["support_skill"]=230010,
|
["support_skill"]=2300110,
|
||||||
["rouge_skill"]=200700,
|
["rouge_skill"]=200700,
|
||||||
["rouge_skill_1"]=200701,
|
["rouge_skill_1"]=200701,
|
||||||
["rouge_skill_2"]=200702,
|
["rouge_skill_2"]=200702,
|
||||||
@ -155,10 +170,15 @@ local hero = {
|
|||||||
[32001]={
|
[32001]={
|
||||||
["position"]=3,
|
["position"]=3,
|
||||||
["qlt"]=2,
|
["qlt"]=2,
|
||||||
["hurt_skill"]=3,
|
["hurt_skill"]={
|
||||||
|
3200111,
|
||||||
|
3200112,
|
||||||
|
3200113,
|
||||||
|
3200114
|
||||||
|
},
|
||||||
["hurt_num"]=3,
|
["hurt_num"]=3,
|
||||||
["base_skill"]=320011,
|
["base_skill"]=3200120,
|
||||||
["support_skill"]=320010,
|
["support_skill"]=3200110,
|
||||||
["rouge_skill"]=200100,
|
["rouge_skill"]=200100,
|
||||||
["rouge_skill_1"]=200101,
|
["rouge_skill_1"]=200101,
|
||||||
["rouge_skill_2"]=200102,
|
["rouge_skill_2"]=200102,
|
||||||
@ -206,10 +226,15 @@ local hero = {
|
|||||||
[33001]={
|
[33001]={
|
||||||
["position"]=3,
|
["position"]=3,
|
||||||
["qlt"]=3,
|
["qlt"]=3,
|
||||||
["hurt_skill"]=3,
|
["hurt_skill"]={
|
||||||
|
3300111,
|
||||||
|
3300112,
|
||||||
|
3300113,
|
||||||
|
3300114
|
||||||
|
},
|
||||||
["hurt_num"]=3,
|
["hurt_num"]=3,
|
||||||
["base_skill"]=330011,
|
["base_skill"]=3300120,
|
||||||
["support_skill"]=330010,
|
["support_skill"]=3300110,
|
||||||
["rouge_skill"]=200600,
|
["rouge_skill"]=200600,
|
||||||
["rouge_skill_1"]=200601,
|
["rouge_skill_1"]=200601,
|
||||||
["rouge_skill_2"]=200602,
|
["rouge_skill_2"]=200602,
|
||||||
@ -257,10 +282,15 @@ local hero = {
|
|||||||
[42001]={
|
[42001]={
|
||||||
["position"]=4,
|
["position"]=4,
|
||||||
["qlt"]=2,
|
["qlt"]=2,
|
||||||
["hurt_skill"]=9,
|
["hurt_skill"]={
|
||||||
|
4200111,
|
||||||
|
4200112,
|
||||||
|
4200113,
|
||||||
|
4200114
|
||||||
|
},
|
||||||
["hurt_num"]=3,
|
["hurt_num"]=3,
|
||||||
["base_skill"]=420011,
|
["base_skill"]=4200120,
|
||||||
["support_skill"]=420010,
|
["support_skill"]=4200110,
|
||||||
["rouge_skill"]=200300,
|
["rouge_skill"]=200300,
|
||||||
["rouge_skill_1"]=200301,
|
["rouge_skill_1"]=200301,
|
||||||
["rouge_skill_2"]=200302,
|
["rouge_skill_2"]=200302,
|
||||||
@ -308,10 +338,15 @@ local hero = {
|
|||||||
[43001]={
|
[43001]={
|
||||||
["position"]=4,
|
["position"]=4,
|
||||||
["qlt"]=3,
|
["qlt"]=3,
|
||||||
["hurt_skill"]=4,
|
["hurt_skill"]={
|
||||||
|
4300111,
|
||||||
|
4300112,
|
||||||
|
4300113,
|
||||||
|
4300114
|
||||||
|
},
|
||||||
["hurt_num"]=3,
|
["hurt_num"]=3,
|
||||||
["base_skill"]=430011,
|
["base_skill"]=4300120,
|
||||||
["support_skill"]=430010,
|
["support_skill"]=4300110,
|
||||||
["rouge_skill"]=200800,
|
["rouge_skill"]=200800,
|
||||||
["rouge_skill_1"]=200801,
|
["rouge_skill_1"]=200801,
|
||||||
["rouge_skill_2"]=200802,
|
["rouge_skill_2"]=200802,
|
||||||
@ -359,10 +394,15 @@ local hero = {
|
|||||||
[52001]={
|
[52001]={
|
||||||
["position"]=5,
|
["position"]=5,
|
||||||
["qlt"]=2,
|
["qlt"]=2,
|
||||||
["hurt_skill"]=5,
|
["hurt_skill"]={
|
||||||
|
5200111,
|
||||||
|
5200112,
|
||||||
|
5200113,
|
||||||
|
5200114
|
||||||
|
},
|
||||||
["hurt_num"]=3,
|
["hurt_num"]=3,
|
||||||
["base_skill"]=520011,
|
["base_skill"]=5200120,
|
||||||
["support_skill"]=520010,
|
["support_skill"]=5200110,
|
||||||
["rouge_skill"]=200400,
|
["rouge_skill"]=200400,
|
||||||
["rouge_skill_1"]=200401,
|
["rouge_skill_1"]=200401,
|
||||||
["rouge_skill_2"]=200402,
|
["rouge_skill_2"]=200402,
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -4,7 +4,7 @@ local tutorial = {
|
|||||||
["type"]=6,
|
["type"]=6,
|
||||||
["finish"]=4,
|
["finish"]=4,
|
||||||
["target_element"]={
|
["target_element"]={
|
||||||
33,
|
13,
|
||||||
24,
|
24,
|
||||||
25
|
25
|
||||||
},
|
},
|
||||||
@ -26,21 +26,28 @@ local tutorial = {
|
|||||||
},
|
},
|
||||||
[10030]={
|
[10030]={
|
||||||
["next_id"]=10040,
|
["next_id"]=10040,
|
||||||
["type"]=5,
|
["type"]=2,
|
||||||
["finish"]=2,
|
["target_name"]="battle_skill_select_ui(Clone)/skill_node/skill_select_cell_1",
|
||||||
["finish_parameter"]=1
|
["arrow_offset"]={
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
},
|
||||||
|
["show_mask"]=1,
|
||||||
|
["square_size"]={
|
||||||
|
500,
|
||||||
|
250
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[10040]={
|
[10040]={
|
||||||
["next_id"]=10050,
|
["next_id"]=10050,
|
||||||
["type"]=6,
|
["type"]=6,
|
||||||
|
["finish"]=4,
|
||||||
["target_element"]={
|
["target_element"]={
|
||||||
33,
|
|
||||||
23,
|
|
||||||
13,
|
13,
|
||||||
14,
|
24,
|
||||||
15,
|
|
||||||
25,
|
25,
|
||||||
35
|
34,
|
||||||
|
44
|
||||||
},
|
},
|
||||||
["arrow_offset"]={
|
["arrow_offset"]={
|
||||||
0,
|
0,
|
||||||
@ -53,13 +60,30 @@ local tutorial = {
|
|||||||
["finish"]=3
|
["finish"]=3
|
||||||
},
|
},
|
||||||
[10060]={
|
[10060]={
|
||||||
|
["next_id"]=10070,
|
||||||
["type"]=6,
|
["type"]=6,
|
||||||
|
["finish"]=4,
|
||||||
["target_element"]={
|
["target_element"]={
|
||||||
23,
|
|
||||||
13,
|
13,
|
||||||
14,
|
14,
|
||||||
15,
|
15,
|
||||||
25
|
24,
|
||||||
|
34
|
||||||
|
},
|
||||||
|
["arrow_offset"]={
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[10070]={
|
||||||
|
["type"]=6,
|
||||||
|
["finish"]=4,
|
||||||
|
["target_element"]={
|
||||||
|
13,
|
||||||
|
14,
|
||||||
|
15,
|
||||||
|
24,
|
||||||
|
34
|
||||||
},
|
},
|
||||||
["arrow_offset"]={
|
["arrow_offset"]={
|
||||||
0,
|
0,
|
||||||
@ -182,9 +206,170 @@ local tutorial = {
|
|||||||
0,
|
0,
|
||||||
0
|
0
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
[30000]={
|
||||||
|
["next_id"]=30010,
|
||||||
|
["type"]=2,
|
||||||
|
["target_name"]="main_ui(Clone)/sub_ui_node/main_comp/chapter/progress_bg/box_1",
|
||||||
|
["arrow_offset"]={
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
},
|
||||||
|
["show_mask"]=2,
|
||||||
|
["circle_r"]=100,
|
||||||
|
["circle_offset"]={
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[30010]={
|
||||||
|
["next_id"]=30020,
|
||||||
|
["type"]=4,
|
||||||
|
["finish"]=1,
|
||||||
|
["finish_parameter"]=2
|
||||||
|
},
|
||||||
|
[30020]={
|
||||||
|
["next_id"]=30030,
|
||||||
|
["type"]=5,
|
||||||
|
["finish"]=2,
|
||||||
|
["finish_parameter"]=2
|
||||||
|
},
|
||||||
|
[30030]={
|
||||||
|
["next_id"]=30040,
|
||||||
|
["type"]=2,
|
||||||
|
["target_name"]="main_ui(Clone)/sub_ui_node/main_comp/hero_bg/hero_cell_2",
|
||||||
|
["arrow_offset"]={
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
},
|
||||||
|
["show_mask"]=1,
|
||||||
|
["square_size"]={
|
||||||
|
100,
|
||||||
|
300
|
||||||
|
},
|
||||||
|
["square_offset"]={
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[30040]={
|
||||||
|
["type"]=2,
|
||||||
|
["target_name"]="hero_detail_ui(Clone)/bg/up_btn",
|
||||||
|
["arrow_offset"]={
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
},
|
||||||
|
["show_mask"]=1,
|
||||||
|
["square_size"]={
|
||||||
|
200,
|
||||||
|
100
|
||||||
|
},
|
||||||
|
["square_offset"]={
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[40000]={
|
||||||
|
["next_id"]=40010,
|
||||||
|
["type"]=2,
|
||||||
|
["target_name"]="main_ui(Clone)/sub_ui_node/main_comp/chapter/progress_bg/box_2",
|
||||||
|
["arrow_offset"]={
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
},
|
||||||
|
["show_mask"]=2,
|
||||||
|
["circle_r"]=100,
|
||||||
|
["circle_offset"]={
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[40010]={
|
||||||
|
["next_id"]=40020,
|
||||||
|
["type"]=4,
|
||||||
|
["finish"]=1,
|
||||||
|
["finish_parameter"]=2
|
||||||
|
},
|
||||||
|
[40020]={
|
||||||
|
["next_id"]=40030,
|
||||||
|
["type"]=5,
|
||||||
|
["finish"]=2,
|
||||||
|
["finish_parameter"]=2
|
||||||
|
},
|
||||||
|
[40030]={
|
||||||
|
["next_id"]=40040,
|
||||||
|
["type"]=2,
|
||||||
|
["target_name"]="main_ui(Clone)/sub_ui_node/hero_ui/scrollrect/viewport/content/scroll_cell_1/prop_node/hero_cell_5",
|
||||||
|
["arrow_offset"]={
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
},
|
||||||
|
["show_mask"]=1,
|
||||||
|
["square_size"]={
|
||||||
|
100,
|
||||||
|
300
|
||||||
|
},
|
||||||
|
["square_offset"]={
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[40040]={
|
||||||
|
["next_id"]=40050,
|
||||||
|
["type"]=2,
|
||||||
|
["target_name"]="hero_detail_ui(Clone)/bg/up_btn",
|
||||||
|
["arrow_offset"]={
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
},
|
||||||
|
["show_mask"]=1,
|
||||||
|
["square_size"]={
|
||||||
|
200,
|
||||||
|
100
|
||||||
|
},
|
||||||
|
["square_offset"]={
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[40050]={
|
||||||
|
["next_id"]=40060,
|
||||||
|
["type"]=2,
|
||||||
|
["target_name"]="hero_detail_ui(Clone)/bg/back_btn",
|
||||||
|
["arrow_offset"]={
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
},
|
||||||
|
["show_mask"]=1
|
||||||
|
},
|
||||||
|
[40060]={
|
||||||
|
["next_id"]=40070,
|
||||||
|
["type"]=2,
|
||||||
|
["target_name"]="main_ui(Clone)/sub_ui_node/hero_ui/scrollrect/viewport/content/scroll_cell_1/prop_node/hero_cell_5",
|
||||||
|
["arrow_offset"]={
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
},
|
||||||
|
["show_mask"]=1,
|
||||||
|
["square_size"]={
|
||||||
|
100,
|
||||||
|
300
|
||||||
|
},
|
||||||
|
["square_offset"]={
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[40070]={
|
||||||
|
["type"]=2,
|
||||||
|
["target_name"]="main_ui(Clone)/sub_ui_node/hero_ui/scrollrect/viewport/content/large_hero_cell/hero_bg/use_btn",
|
||||||
|
["arrow_offset"]={
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
local config = {
|
local config = {
|
||||||
data=tutorial,count=16
|
data=tutorial,count=30
|
||||||
}
|
}
|
||||||
return config
|
return config
|
||||||
@ -8,10 +8,12 @@ local tutorial_start = {
|
|||||||
["uires_path"]="Assets/prefabs/ui/main_city/main_ui.prefab"
|
["uires_path"]="Assets/prefabs/ui/main_city/main_ui.prefab"
|
||||||
},
|
},
|
||||||
[3]={
|
[3]={
|
||||||
["start_id"]=30000
|
["start_id"]=30000,
|
||||||
|
["uires_path"]="Assets/prefabs/ui/main_city/main_ui.prefab"
|
||||||
},
|
},
|
||||||
[4]={
|
[4]={
|
||||||
["start_id"]=40000
|
["start_id"]=40000,
|
||||||
|
["uires_path"]="Assets/prefabs/ui/main_city/main_ui.prefab"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
local config = {
|
local config = {
|
||||||
|
|||||||
@ -653,7 +653,7 @@ function BattleUnitComp:enterSkillAttackState()
|
|||||||
self.targetX = nil
|
self.targetX = nil
|
||||||
local skill
|
local skill
|
||||||
if self.normalSkillCount > 0 then
|
if self.normalSkillCount > 0 then
|
||||||
skill = self.unitEntity:getNormalSkill()
|
skill = self.unitEntity:getNormalSkill(true)
|
||||||
else
|
else
|
||||||
skill = self.currActiveSkill
|
skill = self.currActiveSkill
|
||||||
end
|
end
|
||||||
@ -672,12 +672,9 @@ function BattleUnitComp:enterSkillAttackState()
|
|||||||
else
|
else
|
||||||
self.isMove = false
|
self.isMove = false
|
||||||
self.attackTime = 0
|
self.attackTime = 0
|
||||||
local attackName
|
local attackName = skill:getSkillAttackName()
|
||||||
if self.normalSkillCount > 0 then
|
if self.normalSkillCount > 0 then
|
||||||
attackName = skill:getRandomNormalAttackName()
|
|
||||||
self:attackAndSpeedUp()
|
self:attackAndSpeedUp()
|
||||||
else
|
|
||||||
attackName = skill:getSkillAttackName()
|
|
||||||
end
|
end
|
||||||
self.currAttackDuration = self:getAnimationDuration(attackName)
|
self.currAttackDuration = self:getAnimationDuration(attackName)
|
||||||
self.currAttackKeyTime = self:getAnimationKeyFrameTime(attackName)
|
self.currAttackKeyTime = self:getAnimationKeyFrameTime(attackName)
|
||||||
@ -842,8 +839,9 @@ end
|
|||||||
|
|
||||||
function BattleUnitComp:doNextNormalAttack()
|
function BattleUnitComp:doNextNormalAttack()
|
||||||
self.attackTime = 0
|
self.attackTime = 0
|
||||||
local skill = self.unitEntity:getNormalSkill()
|
local skill = self.unitEntity:getNormalSkill(true)
|
||||||
local attackName = skill:getRandomNormalAttackName()
|
skill:startUse()
|
||||||
|
local attackName = skill:getSkillAttackName()
|
||||||
self.currAttackDuration = self:getAnimationDuration(attackName)
|
self.currAttackDuration = self:getAnimationDuration(attackName)
|
||||||
self.currAttackKeyTime = self:getAnimationKeyFrameTime(attackName)
|
self.currAttackKeyTime = self:getAnimationKeyFrameTime(attackName)
|
||||||
self:playAnimation(attackName, false, false)
|
self:playAnimation(attackName, false, false)
|
||||||
@ -855,8 +853,9 @@ function BattleUnitComp:doNextAttack()
|
|||||||
self.attackTime = 0
|
self.attackTime = 0
|
||||||
local attackName = nil
|
local attackName = nil
|
||||||
if self.normalSkillCount > 0 then
|
if self.normalSkillCount > 0 then
|
||||||
local skill = self.unitEntity:getNormalSkill()
|
local skill = self.unitEntity:getNormalSkill(true)
|
||||||
attackName = skill:getRandomNormalAttackName()
|
skill:startUse()
|
||||||
|
attackName = skill:getSkillAttackName()
|
||||||
if attackName then
|
if attackName then
|
||||||
self.currAttackDuration = self:getAnimationDuration(attackName)
|
self.currAttackDuration = self:getAnimationDuration(attackName)
|
||||||
self.currAttackKeyTime = self:getAnimationKeyFrameTime(attackName)
|
self.currAttackKeyTime = self:getAnimationKeyFrameTime(attackName)
|
||||||
@ -867,6 +866,7 @@ function BattleUnitComp:doNextAttack()
|
|||||||
self:moveBackToInitPosition()
|
self:moveBackToInitPosition()
|
||||||
end
|
end
|
||||||
elseif self.currActiveSkill then
|
elseif self.currActiveSkill then
|
||||||
|
self.currActiveSkill:startUse()
|
||||||
attackName = self.currActiveSkill:getSkillAttackName()
|
attackName = self.currActiveSkill:getSkillAttackName()
|
||||||
if attackName then
|
if attackName then
|
||||||
self.currAttackDuration = self:getAnimationDuration(attackName)
|
self.currAttackDuration = self:getAnimationDuration(attackName)
|
||||||
@ -885,7 +885,7 @@ end
|
|||||||
function BattleUnitComp:enterNormalAttackState()
|
function BattleUnitComp:enterNormalAttackState()
|
||||||
self.attackOver = false
|
self.attackOver = false
|
||||||
self.attackTime = 0
|
self.attackTime = 0
|
||||||
local skill = self.unitEntity:getNormalSkill()
|
local skill = self.unitEntity:getNormalSkill(true)
|
||||||
skill:startUse()
|
skill:startUse()
|
||||||
if skill:getMoveType() == BattleConst.SKILL_MOVE_TYPE.MOVE then
|
if skill:getMoveType() == BattleConst.SKILL_MOVE_TYPE.MOVE then
|
||||||
self.isMove = true
|
self.isMove = true
|
||||||
@ -901,7 +901,7 @@ function BattleUnitComp:enterNormalAttackState()
|
|||||||
else
|
else
|
||||||
self.isMove = false
|
self.isMove = false
|
||||||
self.attackTime = 0
|
self.attackTime = 0
|
||||||
local attackName = skill:getRandomNormalAttackName()
|
local attackName = skill:getSkillAttackName()
|
||||||
self.currAttackDuration = self:getAnimationDuration(attackName)
|
self.currAttackDuration = self:getAnimationDuration(attackName)
|
||||||
self.currAttackKeyTime = self:getAnimationKeyFrameTime(attackName)
|
self.currAttackKeyTime = self:getAnimationKeyFrameTime(attackName)
|
||||||
self:playAnimation(attackName, false, false)
|
self:playAnimation(attackName, false, false)
|
||||||
@ -1272,15 +1272,11 @@ function BattleUnitComp:getEffectAndPlay(skill, fxInfo)
|
|||||||
end
|
end
|
||||||
effectObj:setLocalScale(fxScale, fxScale, fxScale)
|
effectObj:setLocalScale(fxScale, fxScale, fxScale)
|
||||||
end
|
end
|
||||||
-- if fxInfo.is_floor then
|
local baseOrder = BattleHelper:getBaseOrder()
|
||||||
-- effectObj:setSortingOrder(0, 0)
|
effectObj:setSortingOrder(baseOrder, 10)
|
||||||
-- else
|
|
||||||
-- effectObj:changeSortingOrderToFudge(BattleConst.BATTLE_BASE_ORDER, BattleConst.FX_SORTING_FUDGE_COEFFICIENT)
|
|
||||||
-- end
|
|
||||||
effectObj:play()
|
effectObj:play()
|
||||||
duration = duration or effectObj:getDuration()
|
|
||||||
local sid
|
local sid
|
||||||
sid = BattleHelper:performDurationDelay(duration, function()
|
sid = BattleHelper:performDurationDelay(effectObj:getDuration(), function()
|
||||||
BattleHelper:recycleEffect(effectObj)
|
BattleHelper:recycleEffect(effectObj)
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|||||||
@ -177,9 +177,9 @@ function BattleController:init(params)
|
|||||||
self.time = 0
|
self.time = 0
|
||||||
self.battleData:init()
|
self.battleData:init()
|
||||||
BattleScheduler:init()
|
BattleScheduler:init()
|
||||||
|
BattlePool:init()
|
||||||
BattleHelper:init()
|
BattleHelper:init()
|
||||||
BattlePassive:init()
|
BattlePassive:init()
|
||||||
BattlePool:init()
|
|
||||||
self:setTimeScale(DataManager.BattleData:getTimeScale())
|
self:setTimeScale(DataManager.BattleData:getTimeScale())
|
||||||
self:bindData()
|
self:bindData()
|
||||||
self:initBattleTeam()
|
self:initBattleTeam()
|
||||||
@ -256,6 +256,7 @@ function BattleController:prepareFight()
|
|||||||
self:initAtkUnits(onPreloadFinished)
|
self:initAtkUnits(onPreloadFinished)
|
||||||
self:initDefUnits(onPreloadFinished)
|
self:initDefUnits(onPreloadFinished)
|
||||||
end)
|
end)
|
||||||
|
BattleHelper:setBaseOrder(self.battleUI:getUIOrder())
|
||||||
self:loadOtherRes(onPreloadFinished)
|
self:loadOtherRes(onPreloadFinished)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
local UIPrefabObject = require "app/bf/unity/uiprefab_object"
|
local UIPrefabObject = require "app/bf/unity/uiprefab_object"
|
||||||
local BattlePool = require "app/module/battle/helper/battle_pool"
|
local BattlePool = require "app/module/battle/helper/battle_pool"
|
||||||
|
local BattleScheduler = require "app/module/battle/helper/battle_scheduler"
|
||||||
|
|
||||||
local BattleHelper = {}
|
local BattleHelper = {}
|
||||||
|
|
||||||
@ -16,6 +17,15 @@ function BattleHelper:init()
|
|||||||
self.effectPools = BattlePool:getEffectPool()
|
self.effectPools = BattlePool:getEffectPool()
|
||||||
self.effectMap = {}
|
self.effectMap = {}
|
||||||
self.seed = tonumber(tostring(os.time()):reverse():sub(1,6))
|
self.seed = tonumber(tostring(os.time()):reverse():sub(1,6))
|
||||||
|
self.baseOrder = 0
|
||||||
|
end
|
||||||
|
|
||||||
|
function BattleHelper:setBaseOrder(baseOrder)
|
||||||
|
self.baseOrder = baseOrder
|
||||||
|
end
|
||||||
|
|
||||||
|
function BattleHelper:getBaseOrder()
|
||||||
|
return self.baseOrder
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleHelper:getFxConfig()
|
function BattleHelper:getFxConfig()
|
||||||
@ -100,14 +110,15 @@ function BattleHelper:getEffectAsync(name, parent, callback)
|
|||||||
end
|
end
|
||||||
local effect = self.effectPools:pop(path)
|
local effect = self.effectPools:pop(path)
|
||||||
if effect then
|
if effect then
|
||||||
if parent then
|
-- if parent then
|
||||||
effect:setParent(parent, false)
|
-- effect:setParent(parent, false)
|
||||||
end
|
-- end
|
||||||
if self.effectMap then
|
if self.effectMap then
|
||||||
self.effectMap[effect:getInstanceID()] = effect
|
self.effectMap[effect:getInstanceID()] = effect
|
||||||
end
|
end
|
||||||
local timeScale = DataManager.BattleData:getTimeScale()
|
local timeScale = DataManager.BattleData:getTimeScale()
|
||||||
effect:setTimeScale(timeScale)
|
effect:setTimeScale(timeScale)
|
||||||
|
effect:setActive(true)
|
||||||
callback(effect)
|
callback(effect)
|
||||||
else
|
else
|
||||||
EffectManager:loadBattleEffectAsync(path, parent, function(effect)
|
EffectManager:loadBattleEffectAsync(path, parent, function(effect)
|
||||||
@ -134,8 +145,9 @@ function BattleHelper:recycleEffect(effect)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
effect:stop()
|
effect:stop()
|
||||||
|
effect:setActive(false)
|
||||||
if self.effectPools then
|
if self.effectPools then
|
||||||
self.effectPools:push(effect)
|
self.effectPools:push(effect, true)
|
||||||
end
|
end
|
||||||
if self.effectMap then
|
if self.effectMap then
|
||||||
self.effectMap[effect:getInstanceID()] = nil
|
self.effectMap[effect:getInstanceID()] = nil
|
||||||
@ -218,6 +230,18 @@ function BattleHelper:recycleBuffEffect(buffEffect)
|
|||||||
table.insert(self.buffEffectPool, buffEffect)
|
table.insert(self.buffEffectPool, buffEffect)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function BattleHelper:performDurationDelay(delay, func)
|
||||||
|
return BattleScheduler:performWithDelayGlobal(func, delay)
|
||||||
|
end
|
||||||
|
|
||||||
|
function BattleHelper:scheduleGlobal(inter, func)
|
||||||
|
return BattleScheduler:scheduleGlobal(func, inter)
|
||||||
|
end
|
||||||
|
|
||||||
|
function BattleHelper:unscheduleGlobal(scheduleId)
|
||||||
|
BattleScheduler:unscheduleGlobal(scheduleId)
|
||||||
|
end
|
||||||
|
|
||||||
function BattleHelper:clear()
|
function BattleHelper:clear()
|
||||||
self.isClear = true
|
self.isClear = true
|
||||||
self.characterPools = nil
|
self.characterPools = nil
|
||||||
|
|||||||
@ -479,9 +479,8 @@ function BattleData:initHeroData()
|
|||||||
id = heroId,
|
id = heroId,
|
||||||
modelId = heroEntity:getModelId(),
|
modelId = heroEntity:getModelId(),
|
||||||
matchType = matchType,
|
matchType = matchType,
|
||||||
normalSkill = heroEntity:getHurtSkill(),
|
normalSkills = heroEntity:getHurtSkill(),
|
||||||
activeSkills = {activeSkill},
|
activeSkills = {activeSkill},
|
||||||
normalSkillCount = heroEntity:getHurtNum(),
|
|
||||||
assistingSkill = heroEntity:getAssistingSkill(),
|
assistingSkill = heroEntity:getAssistingSkill(),
|
||||||
attr = {
|
attr = {
|
||||||
hp = hp,
|
hp = hp,
|
||||||
@ -512,9 +511,8 @@ function BattleData:addMonster(monsterId, newTeam)
|
|||||||
id = monsterId,
|
id = monsterId,
|
||||||
modelId = monsterInfo.model_id,
|
modelId = monsterInfo.model_id,
|
||||||
matchType = 0,
|
matchType = 0,
|
||||||
normalSkill = monsterInfo.hurt_skill,
|
normalSkills = monsterInfo.hurt_skill,
|
||||||
activeSkills = monsterInfo.skill,
|
activeSkills = monsterInfo.skill,
|
||||||
normalSkillCount = monsterInfo.hurt_num,
|
|
||||||
assistingSkill = nil,
|
assistingSkill = nil,
|
||||||
isBoss = monsterInfo.is_boss,
|
isBoss = monsterInfo.is_boss,
|
||||||
exp = monsterInfo.monster_exp or 0,
|
exp = monsterInfo.monster_exp or 0,
|
||||||
|
|||||||
@ -125,25 +125,6 @@ function BattleSkillEntity:getMoveType()
|
|||||||
return self.skillInfo.skill_position
|
return self.skillInfo.skill_position
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleSkillEntity:getRandomNormalAttackName()
|
|
||||||
if self.normalSkillNameList == nil then
|
|
||||||
local normalSkillNameList, count = self.owner:getNormalSkillNameList()
|
|
||||||
self.normalSkillNameList = {}
|
|
||||||
for i = 1, count do
|
|
||||||
self.normalSkillNameList[i] = normalSkillNameList[i]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if self.normalSkillNameIndex == nil then
|
|
||||||
self.normalSkillNameIndex = math.random(1, #self.normalSkillNameList)
|
|
||||||
else
|
|
||||||
local temp = self.normalSkillNameList[#self.normalSkillNameList]
|
|
||||||
self.normalSkillNameList[#self.normalSkillNameList] = self.normalSkillNameList[self.normalSkillNameIndex]
|
|
||||||
self.normalSkillNameList[self.normalSkillNameIndex] = temp
|
|
||||||
self.normalSkillNameIndex = math.random(1, #self.normalSkillNameList - 1)
|
|
||||||
end
|
|
||||||
return self.normalSkillNameList[self.normalSkillNameIndex]
|
|
||||||
end
|
|
||||||
|
|
||||||
function BattleSkillEntity:getSkillAttackName()
|
function BattleSkillEntity:getSkillAttackName()
|
||||||
return self.skillInfo.name_act
|
return self.skillInfo.name_act
|
||||||
end
|
end
|
||||||
|
|||||||
@ -14,9 +14,17 @@ end
|
|||||||
|
|
||||||
function BattleUnitEntity:initSkill()
|
function BattleUnitEntity:initSkill()
|
||||||
self.activeSkills = {}
|
self.activeSkills = {}
|
||||||
if self.unitData.normalSkill then
|
if self.unitData.normalSkills then
|
||||||
self.normalSkill = BattleSkillEntity:create(self.unitData.normalSkill, GConst.BattleConst.SKILL_TYPE_NORMAL, self)
|
self.normalSkills = {}
|
||||||
|
for k, v in ipairs(self.unitData.normalSkills) do
|
||||||
|
local skill = BattleSkillEntity:create(v, GConst.BattleConst.SKILL_TYPE_NORMAL, self)
|
||||||
|
table.insert(self.normalSkills, skill)
|
||||||
|
end
|
||||||
|
self.normalSkillCount = #self.normalSkills
|
||||||
|
else
|
||||||
|
self.normalSkillCount = 0
|
||||||
end
|
end
|
||||||
|
self.normalSkill = nil
|
||||||
if self.unitData.assistingSkill then
|
if self.unitData.assistingSkill then
|
||||||
self.assistingSkill = BattleSkillEntity:create(self.unitData.assistingSkill, GConst.BattleConst.SKILL_TYPE_ASSISTING, self)
|
self.assistingSkill = BattleSkillEntity:create(self.unitData.assistingSkill, GConst.BattleConst.SKILL_TYPE_ASSISTING, self)
|
||||||
end
|
end
|
||||||
@ -99,7 +107,22 @@ function BattleUnitEntity:getIsMainUnit()
|
|||||||
return self.isMainUnit
|
return self.isMainUnit
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleUnitEntity:getNormalSkill()
|
function BattleUnitEntity:getNormalSkill(reRandom)
|
||||||
|
if self.normalSkills == nil then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
if not reRandom then
|
||||||
|
return self.normalSkill
|
||||||
|
end
|
||||||
|
if self.normalSkillIndex == nil then
|
||||||
|
self.normalSkillIndex = math.random(1, #self.normalSkills)
|
||||||
|
else
|
||||||
|
local temp = self.normalSkills[#self.normalSkills]
|
||||||
|
self.normalSkills[#self.normalSkills] = self.normalSkills[self.normalSkillIndex]
|
||||||
|
self.normalSkills[self.normalSkillIndex] = temp
|
||||||
|
self.normalSkillIndex = math.random(1, #self.normalSkills - 1)
|
||||||
|
end
|
||||||
|
self.normalSkill = self.normalSkills[self.normalSkillIndex]
|
||||||
return self.normalSkill
|
return self.normalSkill
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -124,18 +147,7 @@ function BattleUnitEntity:getActiveSkill(index)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function BattleUnitEntity:getNormalSkillCount()
|
function BattleUnitEntity:getNormalSkillCount()
|
||||||
return self.unitData.normalSkillCount or 0
|
return self.normalSkillCount
|
||||||
end
|
|
||||||
|
|
||||||
function BattleUnitEntity:getNormalSkillNameList()
|
|
||||||
local count = self.unitData.normalSkillCount or 0
|
|
||||||
if self.normalSkillNameList == nil then
|
|
||||||
self.normalSkillNameList = {}
|
|
||||||
for i = 1, count do
|
|
||||||
table.insert(self.normalSkillNameList, DataManager.BattleData:getNormalAttackName(i))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return self.normalSkillNameList, count
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleUnitEntity:getPassiveSkills()
|
function BattleUnitEntity:getPassiveSkills()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user