|
1 | | -[gd_scene load_steps=5 format=3 uid="uid://fvdldxg5au17"] |
| 1 | +[gd_scene load_steps=17 format=3 uid="uid://fvdldxg5au17"] |
2 | 2 |
|
3 | 3 | [ext_resource type="Texture2D" uid="uid://blq8smrhpgtpj" path="res://game-06/graphics/graphics.png" id="1_og0d8"] |
4 | 4 | [ext_resource type="Texture2D" uid="uid://djqy6w0vissy2" path="res://game-06/graphics/glow.png" id="2_p4myk"] |
| 5 | +[ext_resource type="Script" path="res://addons/block_code/block_code_node/block_code.gd" id="3_fm8j6"] |
| 6 | +[ext_resource type="Script" path="res://addons/block_code/serialization/block_serialization_tree.gd" id="4_xb1ij"] |
| 7 | +[ext_resource type="Script" path="res://addons/block_code/serialization/block_serialization.gd" id="5_yr5t4"] |
| 8 | +[ext_resource type="Script" path="res://addons/block_code/serialization/value_block_serialization.gd" id="6_mye12"] |
| 9 | +[ext_resource type="Script" path="res://addons/block_code/serialization/block_script_serialization.gd" id="7_qi5iu"] |
| 10 | +[ext_resource type="Script" path="res://addons/block_code/code_generation/variable_definition.gd" id="8_vi8nk"] |
5 | 11 |
|
6 | | -[sub_resource type="RectangleShape2D" id="RectangleShape2D_j3twr"] |
7 | | -size = Vector2(70, 45) |
| 12 | +[sub_resource type="Resource" id="Resource_aj0an"] |
| 13 | +script = ExtResource("6_mye12") |
| 14 | +name = &"area2d_on_entered:something" |
| 15 | +arguments = {} |
| 16 | + |
| 17 | +[sub_resource type="Resource" id="Resource_7x0to"] |
| 18 | +script = ExtResource("6_mye12") |
| 19 | +name = &"is_node_in_group" |
| 20 | +arguments = { |
| 21 | +"group": "Ship", |
| 22 | +"node": SubResource("Resource_aj0an") |
| 23 | +} |
| 24 | + |
| 25 | +[sub_resource type="Resource" id="Resource_vbvon"] |
| 26 | +script = ExtResource("5_yr5t4") |
| 27 | +name = &"call_method_group" |
| 28 | +children = Array[ExtResource("5_yr5t4")]([]) |
| 29 | +arguments = { |
| 30 | +"group": "Score", |
| 31 | +"method_name": "increase_score" |
| 32 | +} |
| 33 | + |
| 34 | +[sub_resource type="Resource" id="Resource_556d0"] |
| 35 | +script = ExtResource("5_yr5t4") |
| 36 | +name = &"if" |
| 37 | +children = Array[ExtResource("5_yr5t4")]([SubResource("Resource_vbvon")]) |
| 38 | +arguments = { |
| 39 | +"condition": SubResource("Resource_7x0to") |
| 40 | +} |
| 41 | + |
| 42 | +[sub_resource type="Resource" id="Resource_nx2ua"] |
| 43 | +script = ExtResource("5_yr5t4") |
| 44 | +name = &"area2d_on_entered" |
| 45 | +children = Array[ExtResource("5_yr5t4")]([SubResource("Resource_556d0")]) |
| 46 | +arguments = {} |
| 47 | + |
| 48 | +[sub_resource type="Resource" id="Resource_l0udv"] |
| 49 | +script = ExtResource("4_xb1ij") |
| 50 | +root = SubResource("Resource_nx2ua") |
| 51 | +canvas_position = Vector2(75, 100) |
| 52 | + |
| 53 | +[sub_resource type="Resource" id="Resource_1tgsl"] |
| 54 | +script = ExtResource("7_qi5iu") |
| 55 | +script_inherits = "Area2D" |
| 56 | +block_serialization_trees = Array[ExtResource("4_xb1ij")]([SubResource("Resource_l0udv")]) |
| 57 | +variables = Array[ExtResource("8_vi8nk")]([]) |
| 58 | +generated_script = "extends Area2D |
| 59 | +
|
| 60 | +
|
| 61 | +func _init(): |
| 62 | +body_entered.connect(_on_body_entered) |
| 63 | +
|
| 64 | +func _on_body_entered(something: Node2D): |
| 65 | +
|
| 66 | +if ((something).is_in_group('Ship')): |
| 67 | +get_tree().call_group('Score', 'increase_score') |
| 68 | +
|
| 69 | +" |
| 70 | +version = 0 |
8 | 71 |
|
9 | 72 | [sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_q0gxq"] |
10 | 73 | blend_mode = 1 |
11 | 74 |
|
12 | 75 | [node name="Coin" type="RigidBody2D"] |
13 | 76 | gravity_scale = 0.0 |
14 | 77 |
|
15 | | -[node name="CollisionShape2D" type="CollisionShape2D" parent="."] |
16 | | -shape = SubResource("RectangleShape2D_j3twr") |
| 78 | +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] |
| 79 | +polygon = PackedVector2Array(34, -2, -2, 21, -35, 2, -24, -16, -5, -23, 14, -22, 24, -16) |
| 80 | + |
| 81 | +[node name="Area2D" type="Area2D" parent="."] |
| 82 | +scale = Vector2(1.05, 1.05) |
| 83 | + |
| 84 | +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Area2D"] |
| 85 | +polygon = PackedVector2Array(34, -2, -2, 21, -35, 2, -24, -16, -5, -23, 14, -22, 24, -16) |
| 86 | + |
| 87 | +[node name="BlockCode" type="Node" parent="Area2D"] |
| 88 | +script = ExtResource("3_fm8j6") |
| 89 | +block_script = SubResource("Resource_1tgsl") |
17 | 90 |
|
18 | 91 | [node name="Sprite2D" type="Sprite2D" parent="."] |
19 | 92 | material = SubResource("CanvasItemMaterial_q0gxq") |
|
0 commit comments