level now detects (in a very rudimentary way, by checking every frame) whether all blocks have been broken
This commit is contained in:
+13
-2
@@ -1,9 +1,9 @@
|
||||
[gd_scene load_steps=11 format=3 uid="uid://bmscox3qtwvs2"]
|
||||
|
||||
[ext_resource type="Script" path="res://scenes/level.gd" id="1_3qps3"]
|
||||
[ext_resource type="Texture2D" uid="uid://c7wvhwsys1ll4" path="res://resources/backgrounds/levelbg.webp" id="1_7ct6t"]
|
||||
[ext_resource type="FontFile" uid="uid://dxgnofummhosw" path="res://fonts/play_bold.ttf" id="2_musvo"]
|
||||
[ext_resource type="PackedScene" uid="uid://sl3jbnopo0yh" path="res://balls/basic/ball_basic.tscn" id="3_14yi2"]
|
||||
[ext_resource type="Script" path="res://scenes/world_boundary.gd" id="3_w4mye"]
|
||||
[ext_resource type="PackedScene" uid="uid://cbygje4vi2rkv" path="res://boundaries/world_boundary.tscn" id="4_455ct"]
|
||||
[ext_resource type="PackedScene" uid="uid://c1i1fp3xbp6ly" path="res://blocks/block.tscn" id="7_7fnx3"]
|
||||
|
||||
@@ -23,6 +23,7 @@ normal = Vector2(-1, 0)
|
||||
distance = -750.0
|
||||
|
||||
[node name="Level" type="Node2D"]
|
||||
script = ExtResource("1_3qps3")
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="."]
|
||||
position = Vector2(960, 540)
|
||||
@@ -52,13 +53,18 @@ theme_override_font_sizes/font_size = 64
|
||||
text = "BREAKOUT"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Button" type="Button" parent="GUI"]
|
||||
layout_mode = 2
|
||||
theme_override_fonts/font = ExtResource("2_musvo")
|
||||
theme_override_font_sizes/font_size = 50
|
||||
text = "ADD BALL"
|
||||
|
||||
[node name="GameContent" type="Node2D" parent="."]
|
||||
|
||||
[node name="WorldBoundary" type="StaticBody2D" parent="GameContent"]
|
||||
position = Vector2(1140, 540)
|
||||
collision_layer = 2
|
||||
collision_mask = 4
|
||||
script = ExtResource("3_w4mye")
|
||||
|
||||
[node name="Top" parent="GameContent/WorldBoundary" instance=ExtResource("4_455ct")]
|
||||
shape = SubResource("WorldBoundaryShape2D_ybmo2")
|
||||
@@ -118,3 +124,8 @@ position = Vector2(1603, 907)
|
||||
|
||||
[node name="Block12" parent="GameContent/Blocks" instance=ExtResource("7_7fnx3")]
|
||||
position = Vector2(1635, 293)
|
||||
|
||||
[node name="BallSpawn" type="Node2D" parent="GameContent"]
|
||||
position = Vector2(1140, 540)
|
||||
|
||||
[connection signal="pressed" from="GUI/Button" to="." method="_on_button_pressed"]
|
||||
|
||||
Reference in New Issue
Block a user