|
@@ -1,4 +1,4 @@
|
|
|
-[gd_scene load_steps=13 format=2]
|
|
|
+[gd_scene load_steps=14 format=2]
|
|
|
|
|
|
[ext_resource path="res://image/launcher.png" type="Texture" id=1]
|
|
|
[ext_resource path="res://image/brik.png" type="Texture" id=2]
|
|
@@ -6,6 +6,7 @@
|
|
|
[ext_resource path="res://scripts/Launcher.gd" type="Script" id=4]
|
|
|
[ext_resource path="res://image/visor.png" type="Texture" id=5]
|
|
|
[ext_resource path="res://scripts/Grid.gd" type="Script" id=6]
|
|
|
+[ext_resource path="res://scripts/UI.gd" type="Script" id=7]
|
|
|
|
|
|
[sub_resource type="PhysicsMaterial" id=1]
|
|
|
friction = 0.0
|
|
@@ -41,7 +42,7 @@ points = PoolVector2Array( 0, 0, 40, 0, 40, 20, 0, 20 )
|
|
|
} ]
|
|
|
0/z_index = 0
|
|
|
|
|
|
-[node name="Root" type="Node2D"]
|
|
|
+[node name="Root" type="Node"]
|
|
|
|
|
|
[node name="Walls" type="StaticBody2D" parent="."]
|
|
|
physics_material_override = SubResource( 1 )
|
|
@@ -59,7 +60,7 @@ position = Vector2( 200, -50 )
|
|
|
shape = SubResource( 3 )
|
|
|
|
|
|
[node name="Catcher" type="Area2D" parent="."]
|
|
|
-position = Vector2( 200, 470 )
|
|
|
+position = Vector2( 200, 460 )
|
|
|
script = ExtResource( 3 )
|
|
|
|
|
|
[node name="Area" type="CollisionShape2D" parent="Catcher"]
|
|
@@ -68,7 +69,9 @@ shape = SubResource( 4 )
|
|
|
[node name="Launcher" type="Node2D" parent="."]
|
|
|
script = ExtResource( 4 )
|
|
|
|
|
|
-[node name="Grid" type="TileMap" parent="Launcher"]
|
|
|
+[node name="Grid" type="TileMap" parent="Launcher" groups=[
|
|
|
+"grid",
|
|
|
+]]
|
|
|
mode = 2
|
|
|
tile_set = SubResource( 6 )
|
|
|
cell_size = Vector2( 40, 20 )
|
|
@@ -87,7 +90,33 @@ texture = ExtResource( 1 )
|
|
|
[node name="ShootDelay" type="Timer" parent="Launcher"]
|
|
|
wait_time = 0.3
|
|
|
one_shot = true
|
|
|
+
|
|
|
+[node name="UI" type="Control" parent="."]
|
|
|
+visible = false
|
|
|
+margin_right = 40.0
|
|
|
+margin_bottom = 40.0
|
|
|
+script = ExtResource( 7 )
|
|
|
+__meta__ = {
|
|
|
+"_edit_use_anchors_": false
|
|
|
+}
|
|
|
+
|
|
|
+[node name="Panel" type="Panel" parent="UI"]
|
|
|
+margin_left = 100.0
|
|
|
+margin_top = 175.0
|
|
|
+margin_right = 300.0
|
|
|
+margin_bottom = 225.0
|
|
|
+__meta__ = {
|
|
|
+"_edit_use_anchors_": false
|
|
|
+}
|
|
|
+
|
|
|
+[node name="GameOver" type="Label" parent="UI"]
|
|
|
+margin_right = 400.0
|
|
|
+margin_bottom = 400.0
|
|
|
+text = "Game Over"
|
|
|
+align = 1
|
|
|
+valign = 1
|
|
|
[connection signal="body_entered" from="Catcher" to="Catcher" method="_on_Catcher_body_entered"]
|
|
|
+[connection signal="game_over" from="Catcher" to="UI" method="_on_Catcher_game_over"]
|
|
|
[connection signal="get_firing" from="Launcher" to="Launcher" method="_on_Launcher_get_firing"]
|
|
|
[connection signal="is_full" from="Launcher" to="Launcher/Grid" method="_on_Launcher_is_full"]
|
|
|
[connection signal="has_moved" from="Launcher/Grid" to="Launcher" method="_on_Grid_has_moved"]
|