-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathy3pp.b3
More file actions
366 lines (366 loc) · 11 KB
/
y3pp.b3
File metadata and controls
366 lines (366 loc) · 11 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
{
"name": "y3pp",
"description": "",
"data": {
"version": "0.3.0",
"scope": "project",
"selectedTree": "7f321519-38f8-4520-a549-ee74d50cc7fe",
"trees": [
{
"version": "0.3.0",
"scope": "tree",
"id": "a4fd8dbf-2ebb-40f2-8a38-615a620c7209",
"title": "A behavior tree",
"description": "",
"root": null,
"properties": {},
"nodes": {},
"display": {
"camera_x": 496,
"camera_y": 386.5,
"camera_z": 1,
"x": 0,
"y": 0
}
},
{
"version": "0.3.0",
"scope": "tree",
"id": "7f321519-38f8-4520-a549-ee74d50cc7fe",
"title": "robot",
"description": "",
"root": "6a3e217a-420b-4707-ac11-9177bc8eba30",
"properties": {},
"nodes": {
"6a3e217a-420b-4707-ac11-9177bc8eba30": {
"id": "6a3e217a-420b-4707-ac11-9177bc8eba30",
"name": "Sequenece",
"category": "composite",
"title": "Sequenece",
"description": "顺序执行子节点,只要有一个子节点返回failed或running,当前节点也返回failed或running",
"properties": {},
"display": {
"x": -180,
"y": 132
},
"children": [
"2512e281-6590-4f6e-b1e2-e0b448e6a089",
"1c3579f4-2584-4c91-bef3-896e6b8922f8"
]
},
"2512e281-6590-4f6e-b1e2-e0b448e6a089": {
"id": "2512e281-6590-4f6e-b1e2-e0b448e6a089",
"name": "WhenLogin",
"category": "decorator",
"title": "WhenLogin",
"description": "WhenLogin",
"properties": {},
"display": {
"x": 12,
"y": 48
},
"child": "d173549f-7a22-4b0c-ae6f-f858a51962ec"
},
"c50ef019-1f87-4a60-b186-ca3eb0226f08": {
"id": "c50ef019-1f87-4a60-b186-ca3eb0226f08",
"name": "Login",
"category": "action",
"title": "Login",
"description": "Login",
"properties": {
"maxPlayTime": 3600,
"minPlayTime": 30
},
"display": {
"x": 180,
"y": 228
}
},
"1820a30e-e937-4def-a6f3-9eef303d6d33": {
"id": "1820a30e-e937-4def-a6f3-9eef303d6d33",
"name": "IsNotLogged",
"category": "condition",
"title": "IsNotLogged",
"description": "当不处于login状态时返回success,否则failed",
"properties": {},
"display": {
"x": 180,
"y": 132
}
},
"1c3579f4-2584-4c91-bef3-896e6b8922f8": {
"id": "1c3579f4-2584-4c91-bef3-896e6b8922f8",
"name": "Sequenece",
"category": "composite",
"title": "Sequenece",
"description": "顺序执行子节点,只要有一个子节点返回failed或running,当前节点也返回failed或running",
"properties": {},
"display": {
"x": -12,
"y": 180
},
"children": [
"1820a30e-e937-4def-a6f3-9eef303d6d33",
"c50ef019-1f87-4a60-b186-ca3eb0226f08"
]
},
"351bf58b-7009-4546-94cb-26b09fd21d9e": {
"id": "351bf58b-7009-4546-94cb-26b09fd21d9e",
"name": "FindTarget",
"category": "action",
"title": "FindTarget",
"description": "FindTarget",
"properties": {},
"display": {
"x": 348,
"y": 96
}
},
"14ecbb7c-a9cb-4098-aa3d-a131fd423136": {
"id": "14ecbb7c-a9cb-4098-aa3d-a131fd423136",
"name": "WhenHasTarget",
"category": "decorator",
"title": "WhenHasTarget",
"description": "WhenHasTarget",
"properties": {},
"display": {
"x": 348,
"y": -12
},
"child": "9bb98e44-c03c-4c46-9394-b091dfc0fd21"
},
"d173549f-7a22-4b0c-ae6f-f858a51962ec": {
"id": "d173549f-7a22-4b0c-ae6f-f858a51962ec",
"name": "Selector",
"category": "composite",
"title": "Selector",
"description": "顺序执行子节点,如果有一个子节点返回success或running,那么父节点马上返回success或running",
"properties": {},
"display": {
"x": 168,
"y": 48
},
"children": [
"14ecbb7c-a9cb-4098-aa3d-a131fd423136",
"351bf58b-7009-4546-94cb-26b09fd21d9e"
]
},
"32212984-68ed-4df5-9978-297fcd9cf0c8": {
"id": "32212984-68ed-4df5-9978-297fcd9cf0c8",
"name": "Loot",
"category": "action",
"title": "Loot",
"description": "Loot",
"properties": {},
"display": {
"x": 720,
"y": -48
}
},
"9bb98e44-c03c-4c46-9394-b091dfc0fd21": {
"id": "9bb98e44-c03c-4c46-9394-b091dfc0fd21",
"name": "Sequenece",
"category": "composite",
"title": "Sequenece",
"description": "顺序执行子节点,只要有一个子节点返回failed或running,当前节点也返回failed或running",
"properties": {},
"display": {
"x": 528,
"y": -12
},
"children": [
"32212984-68ed-4df5-9978-297fcd9cf0c8",
"7c1d5e91-8639-4215-847b-c327dbb3e29b"
]
},
"7c1d5e91-8639-4215-847b-c327dbb3e29b": {
"id": "7c1d5e91-8639-4215-847b-c327dbb3e29b",
"name": "Logout",
"category": "action",
"title": "Logout",
"description": "Logout",
"properties": {},
"display": {
"x": 720,
"y": 0
}
}
},
"display": {
"camera_x": 763,
"camera_y": 272,
"camera_z": 1.25,
"x": -312,
"y": 132
}
}
],
"custom_nodes": [
{
"version": "0.3.0",
"scope": "node",
"name": "Selector",
"category": "composite",
"title": "Selector",
"description": "顺序执行子节点,如果有一个子节点返回success或running,那么父节点马上返回success或running",
"properties": {}
},
{
"version": "0.3.0",
"scope": "node",
"name": "Sequenece",
"category": "composite",
"title": "Sequenece",
"description": "顺序执行子节点,只要有一个子节点返回failed或running,当前节点也返回failed或running",
"properties": {}
},
{
"version": "0.3.0",
"scope": "node",
"name": "Repeater",
"category": "decorator",
"title": "Repeater",
"description": "重复执行子节点,在达到maxLoop之前,一直返回running。当达到maxLoop后,返回success。maxLoop=0表示无限重复",
"properties": {
"maxLoop": 0
}
},
{
"version": "0.3.0",
"scope": "node",
"name": "Succeeder",
"category": "decorator",
"title": "Succeeder",
"description": "不论子节点返回结果是什么,都返回success",
"properties": {}
},
{
"version": "0.3.0",
"scope": "node",
"name": "UntilFailure",
"category": "decorator",
"title": "UntilFailure",
"description": "重复执行子节点,直到子节点返回failed,此节点会返回success。或者达到maxLoop次后,此节点返回failed",
"properties": {
"maxLoop": 0
}
},
{
"version": "0.3.0",
"scope": "node",
"name": "UntilSuccess",
"category": "decorator",
"title": "UntilSuccess",
"description": "重复执行子节点,直到子节点返回success,此节点会返回success。或者达到maxLoop次后,此节点返回failed",
"properties": {
"maxLoop": 0
}
},
{
"version": "0.3.0",
"scope": "node",
"name": "Wait",
"category": "action",
"title": "Wait@ms",
"description": "等待一待时间",
"properties": {
"duration": 500
}
},
{
"version": "0.3.0",
"scope": "node",
"name": "DecWhenLogin",
"category": "decorator",
"title": "DecWhenLogin",
"description": "DecWhenLogin",
"properties": {}
},
{
"version": "0.3.0",
"scope": "node",
"name": "WhenHasTarget",
"category": "decorator",
"title": "WhenHasTarget",
"description": "WhenHasTarget",
"properties": {}
},
{
"version": "0.3.0",
"scope": "node",
"name": "WhenLogin",
"category": "decorator",
"title": "WhenLogin",
"description": "WhenLogin",
"properties": {}
},
{
"version": "0.3.0",
"scope": "node",
"name": "WhenNotLogin",
"category": "decorator",
"title": "WhenNotLogin",
"description": "WhenNotLogin",
"properties": {}
},
{
"version": "0.3.0",
"scope": "node",
"name": "FindTarget",
"category": "action",
"title": "FindTarget",
"description": "FindTarget",
"properties": {}
},
{
"version": "0.3.0",
"scope": "node",
"name": "Logout",
"category": "action",
"title": "Logout",
"description": "Logout",
"properties": {}
},
{
"version": "0.3.0",
"scope": "node",
"name": "Loot",
"category": "action",
"title": "Loot",
"description": "Loot",
"properties": {}
},
{
"version": "0.3.0",
"scope": "node",
"name": "IsLogged",
"category": "condition",
"title": "IsLogged",
"description": "当处于login状态时返回success,否则failed",
"properties": {}
},
{
"version": "0.3.0",
"scope": "node",
"name": "IsNotLogged",
"category": "condition",
"title": "IsNotLogged",
"description": "当不处于login状态时返回success,否则failed",
"properties": {}
},
{
"version": "0.3.0",
"scope": "node",
"name": "Login",
"category": "action",
"title": "Login",
"description": "Login",
"properties": {
"maxPlayTime": 3600,
"minPlayTime": 30
}
}
]
},
"path": "Z:\\home\\billy\\project\\cpp\\y3pp\\gosrc\\bhtree\\y3pp.b3"
}