godot-shooter / commit
Simplified HUD a bit.
HUD.gd | 2 +- HUD.tscn | 51 +++++++++------------------------------------------ 2 files changed, 10 insertions(+), 43 deletions(-) diff --git a/HUD.gd b/HUD.gd index 287e16f..b209ab7 100644 --- a/HUD.gd +++ b/HUD.gd @@ -6,7 +6,7 @@ func _ready() -> void: $AnimationPlayer.play("instructions fade") func _process(_delta: float) -> void: - $VBoxContainer/HBoxContainer2/HBoxContainer/Score.text = "%s" % score + $VBoxContainer/HBoxContainer/Score.text = "%s" % score if Input.is_action_just_pressed("exit"): if OS.get_name() == "OSX": get_tree().quit() diff --git a/HUD.tscn b/HUD.tscn index 7bec601..7bf9b20 100644 --- a/HUD.tscn +++ b/HUD.tscn @@ -6,45 +6,17 @@ [sub_resource type="Animation" id=1] resource_name = "instructions fade" length = 6.0 -tracks/0/type = "bezier" -tracks/0/path = NodePath("Label:modulate:r") +tracks/0/type = "value" +tracks/0/path = NodePath("Label:modulate") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/imported = false tracks/0/enabled = true tracks/0/keys = { -"points": PoolRealArray( ), -"times": PoolRealArray( ) -} -tracks/1/type = "bezier" -tracks/1/path = NodePath("Label:modulate:g") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/keys = { -"points": PoolRealArray( ), -"times": PoolRealArray( ) -} -tracks/2/type = "bezier" -tracks/2/path = NodePath("Label:modulate:b") -tracks/2/interp = 1 -tracks/2/loop_wrap = true -tracks/2/imported = false -tracks/2/enabled = true -tracks/2/keys = { -"points": PoolRealArray( ), -"times": PoolRealArray( ) -} -tracks/3/type = "bezier" -tracks/3/path = NodePath("Label:modulate:a") -tracks/3/interp = 1 -tracks/3/loop_wrap = true -tracks/3/imported = false -tracks/3/enabled = true -tracks/3/keys = { -"points": PoolRealArray( 1, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0 ), -"times": PoolRealArray( 0, 3 ) +"times": PoolRealArray( 0, 6 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 0, +"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ] } [node name="HUD" type="Control"] @@ -57,20 +29,16 @@ script = ExtResource( 2 ) margin_right = 40.0 margin_bottom = 40.0 -[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer"] +[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"] margin_right = 617.0 margin_bottom = 74.0 -[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2"] -margin_right = 278.0 -margin_bottom = 74.0 - -[node name="ScoreText" type="Label" parent="VBoxContainer/HBoxContainer2/HBoxContainer"] +[node name="ScoreText" type="Label" parent="VBoxContainer/HBoxContainer"] margin_right = 192.0 margin_bottom = 74.0 text = "Score: " -[node name="Score" type="Label" parent="VBoxContainer/HBoxContainer2/HBoxContainer"] +[node name="Score" type="Label" parent="VBoxContainer/HBoxContainer"] margin_left = 196.0 margin_right = 278.0 margin_bottom = 74.0 @@ -84,7 +52,6 @@ margin_bottom = 152.0 theme = ExtResource( 1 ) [node name="Label" type="Label" parent="VBoxContainer/CenterContainer"] -modulate = Color( 1, 1, 1, 0 ) margin_right = 617.0 margin_bottom = 74.0 theme = ExtResource( 1 )