1- [gd_scene load_steps =35 format =3 uid ="uid://cmmr1lf2ucuhb" ]
1+ [gd_scene load_steps =30 format =3 uid ="uid://cmmr1lf2ucuhb" ]
22
33[ext_resource type ="Texture2D" uid ="uid://ckre7g8q0t1s1" path ="res://game-05/ball.png" id ="1_xd7ho" ]
44[ext_resource type ="Script" path ="res://addons/block_code/block_code_node/block_code.gd" id ="2_vitvw" ]
55[ext_resource type ="Script" path ="res://addons/block_code/serialization/block_serialization.gd" id ="3_c4i6b" ]
6- [ext_resource type ="Script" path ="res://addons/block_code/serialization/block_serialized_properties .gd" id ="4_26ms3 " ]
7- [ext_resource type ="Script" path ="res://addons/block_code/ui/block_canvas/option_data .gd" id ="5_jmekh " ]
6+ [ext_resource type ="Script" path ="res://addons/block_code/serialization/block_serialization_tree .gd" id ="3_lo8gc " ]
7+ [ext_resource type ="Script" path ="res://addons/block_code/code_generation/variable_definition .gd" id ="5_23agp " ]
88[ext_resource type ="Script" path ="res://addons/block_code/serialization/block_script_serialization.gd" id ="5_q5ast" ]
9- [ext_resource type ="Script" path ="res://addons/block_code/ui/block_canvas/variable_resource .gd" id ="6_1y36j " ]
9+ [ext_resource type ="Script" path ="res://addons/block_code/serialization/value_block_serialization .gd" id ="7_xcp0q " ]
1010
1111[sub_resource type ="CircleShape2D" id ="CircleShape2D_a2i5o" ]
1212radius = 38.1182
@@ -176,154 +176,133 @@ _data = {
176176"taken" : SubResource ("Animation_7lvl8" )
177177}
178178
179- [sub_resource type ="Resource" id ="Resource_yye01" ]
180- script = ExtResource ("4_26ms3" )
181- block_class = &"EntryBlock"
182- serialized_props = [["scope" , "" ], ["param_input_strings" , {
183- "method_name" : "blaster_item_taken"
184- }]]
185-
186- [sub_resource type ="Resource" id ="Resource_chjbf" ]
187- script = ExtResource ("5_jmekh" )
188- selected = 0
189- items = ["ahead" , "backwards" ]
190-
191- [sub_resource type ="Resource" id ="Resource_gwrxy" ]
192- script = ExtResource ("4_26ms3" )
193- block_class = &"StatementBlock"
194- serialized_props = [["scope" , "" ], ["param_input_strings" , {
195- "animation" : "taken" ,
196- "direction" : SubResource ("Resource_chjbf" )
197- }]]
198-
199- [sub_resource type ="Resource" id ="Resource_vmsnf" ]
179+ [sub_resource type ="Resource" id ="Resource_jd7pq" ]
200180script = ExtResource ("3_c4i6b" )
201181name = &"animationplayer_play"
202- position = Vector2 (0 , 0 )
203- path_child_pairs = []
204- block_serialized_properties = SubResource ("Resource_gwrxy" )
182+ children = Array[ExtResource ("3_c4i6b" )]([])
183+ arguments = {
184+ "animation" : "taken" ,
185+ "direction" : "forward" ,
186+ "wait_mode" : "until done"
187+ }
205188
206- [sub_resource type ="Resource" id ="Resource_xygx6 " ]
189+ [sub_resource type ="Resource" id ="Resource_vsmpb " ]
207190script = ExtResource ("3_c4i6b" )
208191name = &"define_method"
209- position = Vector2 (50 , 100 )
210- path_child_pairs = [[NodePath ("VBoxContainer/SnapPoint" ), SubResource ("Resource_vmsnf" )]]
211- block_serialized_properties = SubResource ("Resource_yye01" )
192+ children = Array[ExtResource ("3_c4i6b" )]([SubResource ("Resource_jd7pq" )])
193+ arguments = {
194+ "method_name" : &"play_taken_animation"
195+ }
196+
197+ [sub_resource type ="Resource" id ="Resource_w0ryj" ]
198+ script = ExtResource ("3_lo8gc" )
199+ root = SubResource ("Resource_vsmpb" )
200+ canvas_position = Vector2 (50 , 125 )
212201
213- [sub_resource type ="Resource" id ="Resource_1b55m " ]
202+ [sub_resource type ="Resource" id ="Resource_sv2sr " ]
214203script = ExtResource ("5_q5ast" )
215204script_inherits = "AnimationPlayer"
216- block_trees = Array[ExtResource ("3_c4i6b " )]([SubResource ("Resource_xygx6 " )])
217- variables = Array[ExtResource ("6_1y36j " )]([])
205+ block_serialization_trees = Array[ExtResource ("3_lo8gc " )]([SubResource ("Resource_w0ryj " )])
206+ variables = Array[ExtResource ("5_23agp " )]([])
218207generated_script = "extends AnimationPlayer
219208
220209
221- func blaster_item_taken ():
222- if \" ahead \" == \" ahead \" :
210+ func play_taken_animation ():
211+ if 'forward' == \" forward \" :
223212 play('taken')
224213 else:
225214 play_backwards('taken')
215+ if 'until done' == \" until done\" :
216+ await animation_finished
217+
226218
227219"
228220version = 0
229221
230- [sub_resource type ="Resource" id ="Resource_h7lwv " ]
231- script = ExtResource ("4_26ms3 " )
232- block_class = &"EntryBlock "
233- serialized_props = [[ "scope" , "" ], [ "param_input_strings" , {}]]
222+ [sub_resource type ="Resource" id ="Resource_n4m4m " ]
223+ script = ExtResource ("7_xcp0q " )
224+ name = &"area2d_on_entered:something "
225+ arguments = {}
234226
235- [sub_resource type ="Resource" id ="Resource_you3k" ]
236- script = ExtResource ("4_26ms3" )
237- block_class = &"ParameterBlock"
238- serialized_props = [["block_name" , &"parameter_block" ], ["label" , "Param" ], ["color" , Color (0.294118 , 0.482353 , 0.92549 , 1 )], ["block_type" , 3 ], ["position" , Vector2 (0 , 0 )], ["scope" , "func _on_body_entered(body: Node2D):
239- " ], ["block_format" , "body" ], ["statement" , "body" ], ["defaults" , {}], ["variant_type" , 24 ], ["param_input_strings" , {}]]
227+ [sub_resource type ="Resource" id ="Resource_nuvq3" ]
228+ script = ExtResource ("7_xcp0q" )
229+ name = &"is_node_in_group"
230+ arguments = {
231+ "group" : "Ship" ,
232+ "node" : SubResource ("Resource_n4m4m" )
233+ }
240234
241- [sub_resource type ="Resource" id ="Resource_gyar3" ]
242- script = ExtResource ("3_c4i6b" )
243- name = &"parameter_block"
244- position = Vector2 (0 , 0 )
245- path_child_pairs = []
246- block_serialized_properties = SubResource ("Resource_you3k" )
247-
248- [sub_resource type ="Resource" id ="Resource_228qx" ]
249- script = ExtResource ("4_26ms3" )
250- block_class = &"ControlBlock"
251- serialized_props = [["scope" , "" ], ["param_input_strings_array" , [{
252- "condition" : false
253- }]]]
254-
255- [sub_resource type ="Resource" id ="Resource_rjx46" ]
256- script = ExtResource ("4_26ms3" )
257- block_class = &"ParameterBlock"
258- serialized_props = [["scope" , "" ], ["param_input_strings" , {
259- "group" : "player" ,
260- "node" : ""
261- }]]
262-
263- [sub_resource type ="Resource" id ="Resource_bj127" ]
264- script = ExtResource ("4_26ms3" )
265- block_class = &"ParameterBlock"
266- serialized_props = [["block_name" , &"parameter_block" ], ["label" , "Param" ], ["color" , Color (0.294118 , 0.482353 , 0.92549 , 1 )], ["block_type" , 3 ], ["position" , Vector2 (0 , 0 )], ["scope" , "func _on_body_entered(body: Node2D):
267- " ], ["block_format" , "body" ], ["statement" , "body" ], ["defaults" , {}], ["variant_type" , 24 ], ["param_input_strings" , {}]]
268-
269- [sub_resource type ="Resource" id ="Resource_uhg3l" ]
235+ [sub_resource type ="Resource" id ="Resource_lortg" ]
236+ script = ExtResource ("7_xcp0q" )
237+ name = &"get_node"
238+ arguments = {
239+ "path" : NodePath ("%AnimationPlayer" )
240+ }
241+
242+ [sub_resource type ="Resource" id ="Resource_31cha" ]
270243script = ExtResource ("3_c4i6b" )
271- name = &"parameter_block"
272- position = Vector2 (0 , 0 )
273- path_child_pairs = []
274- block_serialized_properties = SubResource ("Resource_bj127" )
244+ name = &"call_method_node"
245+ children = Array[ExtResource ("3_c4i6b" )]([])
246+ arguments = {
247+ "method_name" : "play_taken_animation" ,
248+ "node" : SubResource ("Resource_lortg" )
249+ }
275250
276- [sub_resource type ="Resource" id ="Resource_ld7g3 " ]
251+ [sub_resource type ="Resource" id ="Resource_futqs " ]
277252script = ExtResource ("3_c4i6b" )
278- name = &"is_node_in_group"
279- position = Vector2 (0 , 0 )
280- path_child_pairs = [[NodePath ("MarginContainer/HBoxContainer/ParameterInput0/SnapPoint" ), SubResource ("Resource_uhg3l" )]]
281- block_serialized_properties = SubResource ("Resource_rjx46" )
282-
283- [sub_resource type ="Resource" id ="Resource_4kagx" ]
284- script = ExtResource ("4_26ms3" )
285- block_class = &"StatementBlock"
286- serialized_props = [["scope" , "" ], ["param_input_strings" , {
287- "group" : "blaster_item_listener" ,
253+ name = &"call_method_group"
254+ children = Array[ExtResource ("3_c4i6b" )]([])
255+ arguments = {
256+ "group" : "Ship" ,
288257"method_name" : "blaster_item_taken"
289- }]]
258+ }
290259
291- [sub_resource type ="Resource" id ="Resource_1lyj8 " ]
260+ [sub_resource type ="Resource" id ="Resource_whqbj " ]
292261script = ExtResource ("3_c4i6b" )
293262name = &"call_method_group"
294- position = Vector2 (20 , 0 )
295- path_child_pairs = []
296- block_serialized_properties = SubResource ("Resource_4kagx" )
263+ children = Array[ExtResource ("3_c4i6b" )]([])
264+ arguments = {
265+ "group" : "tutorial_animations" ,
266+ "method_name" : "play_tutorial_blaster"
267+ }
297268
298- [sub_resource type ="Resource" id ="Resource_0p166 " ]
269+ [sub_resource type ="Resource" id ="Resource_swcvn " ]
299270script = ExtResource ("3_c4i6b" )
300271name = &"if"
301- position = Vector2 (0 , 0 )
302- path_child_pairs = [[NodePath ("VBoxContainer/MarginContainer/Rows/Row0/RowHBoxContainer/RowHBox/ParameterInput0/SnapPoint" ), SubResource ("Resource_ld7g3" )], [NodePath ("VBoxContainer/MarginContainer/Rows/SnapContainer0/SnapPoint" ), SubResource ("Resource_1lyj8" )]]
303- block_serialized_properties = SubResource ("Resource_228qx" )
272+ children = Array[ExtResource ("3_c4i6b" )]([SubResource ("Resource_31cha" ), SubResource ("Resource_futqs" ), SubResource ("Resource_whqbj" )])
273+ arguments = {
274+ "condition" : SubResource ("Resource_nuvq3" )
275+ }
304276
305- [sub_resource type ="Resource" id ="Resource_xmpho " ]
277+ [sub_resource type ="Resource" id ="Resource_43oil " ]
306278script = ExtResource ("3_c4i6b" )
307279name = &"area2d_on_entered"
308- position = Vector2 (125 , 75 )
309- path_child_pairs = [[NodePath ("VBoxContainer/TopMarginContainer/MarginContainer/HBoxContainer/ParameterOutput0/SnapPoint" ), SubResource ("Resource_gyar3" )], [NodePath ("VBoxContainer/SnapPoint" ), SubResource ("Resource_0p166" )]]
310- block_serialized_properties = SubResource ("Resource_h7lwv" )
280+ children = Array[ExtResource ("3_c4i6b" )]([SubResource ("Resource_swcvn" )])
281+ arguments = {}
311282
312- [sub_resource type ="Resource" id ="Resource_wli32" ]
283+ [sub_resource type ="Resource" id ="Resource_veamu" ]
284+ script = ExtResource ("3_lo8gc" )
285+ root = SubResource ("Resource_43oil" )
286+ canvas_position = Vector2 (50 , 150 )
287+
288+ [sub_resource type ="Resource" id ="Resource_n8w8p" ]
313289script = ExtResource ("5_q5ast" )
314290script_inherits = "Area2D"
315- block_trees = Array[ExtResource ("3_c4i6b " )]([SubResource ("Resource_xmpho " )])
316- variables = Array[ExtResource ("6_1y36j " )]([])
291+ block_serialization_trees = Array[ExtResource ("3_lo8gc " )]([SubResource ("Resource_veamu " )])
292+ variables = Array[ExtResource ("5_23agp " )]([])
317293generated_script = "extends Area2D
318294
319295
320- func _on_body_entered(body: Node2D):
321-
322- if body.is_in_group('player'):
323- get_tree().call_group('blaster_item_listener', 'blaster_item_taken')
324-
325296func _init():
326297 body_entered.connect(_on_body_entered)
298+
299+ func _on_body_entered(something: Node2D):
300+
301+ if ((something).is_in_group('Ship')):
302+ (get_node(\" %AnimationPlayer\" )).call('play_taken_animation')
303+ get_tree().call_group('Ship', 'blaster_item_taken')
304+ get_tree().call_group('tutorial_animations', 'play_tutorial_blaster')
305+
327306"
328307version = 0
329308
@@ -345,15 +324,16 @@ texture = SubResource("GradientTexture2D_wl14y")
345324height = 50.0
346325
347326[node name ="AnimationPlayer" type ="AnimationPlayer" parent ="." groups =["blaster_item_listener" ]]
327+ unique_name_in_owner = true
348328libraries = {
349329"" : SubResource ("AnimationLibrary_62oaf" )
350330}
351331autoplay = "flickering"
352332
353333[node name ="BlockCode" type ="Node" parent ="AnimationPlayer" ]
354334script = ExtResource ("2_vitvw" )
355- block_script = SubResource ("Resource_1b55m " )
335+ block_script = SubResource ("Resource_sv2sr " )
356336
357337[node name ="BlockCode" type ="Node" parent ="." ]
358338script = ExtResource ("2_vitvw" )
359- block_script = SubResource ("Resource_wli32 " )
339+ block_script = SubResource ("Resource_n8w8p " )
0 commit comments