diff options
| -rw-r--r-- | HUD.tscn | 10 | ||||
| -rw-r--r-- | HealthBar.gd | 4 | ||||
| -rw-r--r-- | Wordart.gd | 7 | ||||
| -rw-r--r-- | assets/wordart.png | bin | 0 -> 990940 bytes | |||
| -rw-r--r-- | project.godot | 4 |
5 files changed, 22 insertions, 3 deletions
@@ -1,6 +1,8 @@ -[gd_scene load_steps=2 format=2] +[gd_scene load_steps=4 format=2] [ext_resource path="res://HealthBar.gd" type="Script" id=1] +[ext_resource path="res://Wordart.gd" type="Script" id=2] +[ext_resource path="res://assets/wordart.png" type="Texture" id=3] [node name="HUD" type="CanvasLayer"] @@ -38,3 +40,9 @@ margin_left = 1272.0 margin_right = 1280.0 margin_bottom = 14.0 text = "0" + +[node name="Wordart" type="Sprite" parent="."] +position = Vector2( 626, 372 ) +scale = Vector2( 0.171967, 0.186029 ) +texture = ExtResource( 3 ) +script = ExtResource( 2 ) diff --git a/HealthBar.gd b/HealthBar.gd index ab9c68b..91a5b8e 100644 --- a/HealthBar.gd +++ b/HealthBar.gd @@ -4,11 +4,11 @@ extends ProgressBar # Declare member variables here. Examples: # var a = 2 # var b = "text" - +signal player_dead # Called when the node enters the scene tree for the first time. func _ready(): - pass # Replace with function body. + connect("player_dead", get_node("/root/Main/HUD/Wordart"), "_on_player_dead") # Called every frame. 'delta' is the elapsed time since the previous frame. diff --git a/Wordart.gd b/Wordart.gd new file mode 100644 index 0000000..6204e10 --- /dev/null +++ b/Wordart.gd @@ -0,0 +1,7 @@ +extends Sprite + +func _ready(): + visible = false + +func _on_player_dead(): + visible = true diff --git a/assets/wordart.png b/assets/wordart.png Binary files differnew file mode 100644 index 0000000..a4030d1 --- /dev/null +++ b/assets/wordart.png diff --git a/project.godot b/project.godot index a6eab52..035fc3a 100644 --- a/project.godot +++ b/project.godot @@ -25,6 +25,10 @@ window/size/height=720 window/stretch/mode="2d" window/stretch/aspect="keep" +[global] + +fonts=false + [gui] common/drop_mouse_on_gui_input_disabled=true |
