Add score for ball exchange
This commit is contained in:
parent
582a39992c
commit
40525022d7
6 changed files with 70 additions and 1 deletions
18
scenes/hud.tscn
Normal file
18
scenes/hud.tscn
Normal file
|
@ -0,0 +1,18 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://bxj8v34v1igyc"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/hud.gd" id="1_glf76"]
|
||||
[ext_resource type="FontFile" uid="uid://8guv2d1fgna7" path="res://art/fonts/DraftingMono-Regular.ttf" id="1_xr1ih"]
|
||||
|
||||
[node name="HUD" type="CanvasLayer"]
|
||||
script = ExtResource("1_glf76")
|
||||
|
||||
[node name="ScoreLabel" type="Label" parent="."]
|
||||
anchors_preset = 1
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
offset_left = -60.0
|
||||
offset_bottom = 41.0
|
||||
grow_horizontal = 0
|
||||
theme_override_fonts/font = ExtResource("1_xr1ih")
|
||||
theme_override_font_sizes/font_size = 30
|
||||
text = "0"
|
|
@ -1,11 +1,14 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://cdwgmtyq2y8sm"]
|
||||
[gd_scene load_steps=6 format=3 uid="uid://cdwgmtyq2y8sm"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/main.gd" id="1_1xo8b"]
|
||||
[ext_resource type="PackedScene" uid="uid://m8uyi35gr3qd" path="res://scenes/tile_map.tscn" id="2_c6bkg"]
|
||||
[ext_resource type="PackedScene" uid="uid://ba1t35yyot4jl" path="res://scenes/player.tscn" id="2_idv37"]
|
||||
[ext_resource type="PackedScene" uid="uid://bktg1ypaav3q3" path="res://scenes/enemy.tscn" id="3_2xcd4"]
|
||||
[ext_resource type="PackedScene" uid="uid://bxj8v34v1igyc" path="res://scenes/hud.tscn" id="4_ealqo"]
|
||||
|
||||
[node name="Main" type="Node2D"]
|
||||
y_sort_enabled = true
|
||||
script = ExtResource("1_1xo8b")
|
||||
|
||||
[node name="TileMap" parent="." instance=ExtResource("2_c6bkg")]
|
||||
position = Vector2(324, 82)
|
||||
|
@ -19,3 +22,7 @@ position = Vector2(0, 40)
|
|||
z_index = 1
|
||||
z_as_relative = false
|
||||
y_sort_enabled = true
|
||||
|
||||
[node name="HUD" parent="." instance=ExtResource("4_ealqo")]
|
||||
|
||||
[connection signal="hit_ball" from="TileMap/Player" to="." method="_on_player_hit_ball"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue