mirror of
https://git.kittycat.homes/zoe/pegchamp.git
synced 2024-08-15 03:15:39 +00:00
add heart level, bugfixes
This commit is contained in:
parent
41c3dfa881
commit
c30cc4589e
9 changed files with 265 additions and 36 deletions
19
HUD/HUD.tscn
19
HUD/HUD.tscn
|
@ -1,10 +1,11 @@
|
|||
[gd_scene load_steps=6 format=2]
|
||||
[gd_scene load_steps=7 format=2]
|
||||
|
||||
[ext_resource path="res://Ball/sprite.png" type="Texture" id=1]
|
||||
[ext_resource path="res://HUD/BallCounter.gd" type="Script" id=2]
|
||||
[ext_resource path="res://HUD/Multiplier.gd" type="Script" id=3]
|
||||
[ext_resource path="res://Menu/Theme.tres" type="Theme" id=4]
|
||||
[ext_resource path="res://HUD/Score.gd" type="Script" id=5]
|
||||
[ext_resource path="res://HUD/PinksLabel.gd" type="Script" id=6]
|
||||
|
||||
[node name="HUD" type="CanvasLayer"]
|
||||
|
||||
|
@ -25,9 +26,9 @@ script = ExtResource( 2 )
|
|||
|
||||
[node name="Multiplier" type="Label" parent="."]
|
||||
margin_left = 336.0
|
||||
margin_top = 176.0
|
||||
margin_top = 170.0
|
||||
margin_right = 376.0
|
||||
margin_bottom = 190.0
|
||||
margin_bottom = 188.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 0
|
||||
theme = ExtResource( 4 )
|
||||
|
@ -38,6 +39,18 @@ __meta__ = {
|
|||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="PinksLabel" type="Label" parent="."]
|
||||
margin_left = 16.0
|
||||
margin_top = 188.0
|
||||
margin_right = 72.0
|
||||
margin_bottom = 206.0
|
||||
theme = ExtResource( 4 )
|
||||
text = "Left:"
|
||||
script = ExtResource( 6 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Score" type="Label" parent="."]
|
||||
margin_left = 336.0
|
||||
margin_top = 192.0
|
||||
|
|
10
HUD/PinksLabel.gd
Normal file
10
HUD/PinksLabel.gd
Normal file
|
@ -0,0 +1,10 @@
|
|||
extends Label
|
||||
|
||||
func _ready():
|
||||
visible = false
|
||||
var _connected = GameStats.connect("pink_changed", self, "update_text")
|
||||
call_deferred("update_text", GameStats.pinks_left)
|
||||
|
||||
func update_text(value):
|
||||
visible = true
|
||||
text ="left " + String(value)
|
Loading…
Add table
Add a link
Reference in a new issue