-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRef_f_m.lua
52 lines (40 loc) · 1.19 KB
/
Ref_f_m.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
gPlayTable.CreatePlay{
firstState = "GetBall",
["GetBall"] = {--r跑位的同时,k去拿球然后面向r,若检测到k拿到了球则跳转到PassBall,
switch = function()
if CIsGetBall("Kicker") then
return "PassBall"
end
end,
Receiver = task.GoRecePos("Receiver"),
Kicker = task.GetBall("Kicker","Receiver"),
},
["PassBall"] = {--k进行传球,若检测到k踢了球就跳转到SecondPassBall
switch = function()
if CIsBallKick("Kicker") then
return "SecondPassBall"
end
end,
Kicker = task.PassBall("Kicker","Receiver"),
},
["SecondPassBall"] = {--k传完之后去跑位,r去拿球然后再传给r,若检测到r踢了球就跳转到Shoot
switch = function()
if CIsBallKick("Receiver") then
return "Shoot"
end
end,
Kicker = task.GoRecePos("Kicker"),
Receiver = task.GetBall("Receiver","Kicker"),
Receiver = task.PassBall("Receiver","Kicker"),
},
["Shoot"] = {--k去拿球然后射门,若检测到k踢了球就结束
switch = function()
if CIsBallKick("Kicker") then
return "finish"
end
end,
Kicker = task.GetBall("Kicker","Receiver"),
Kicker = task.Shoot("Kicker"),
},
name = "Ref_f_m"
}