Forráskód Böngészése

Delete start button

DricomDragon 5 éve
szülő
commit
968f42d3b5
3 módosított fájl, 2 hozzáadás és 31 törlés
  1. 0 2
      HUD.gd
  2. 1 28
      HUD.tscn
  3. 1 1
      Main.tscn

+ 0 - 2
HUD.gd

@@ -16,7 +16,6 @@ func show_game_over():
 	$MessageLabel.text = "Dodge again ?"
 	$MessageLabel.show()
 	yield(get_tree().create_timer(1.0), "timeout")
-	$StartButton.show()
 	$ColorButton.show()
 
 func update_score(score):
@@ -28,6 +27,5 @@ func _on_MessageTimer_timeout():
 
 
 func _on_StartButton_pressed():
-	$StartButton.hide()
 	$ColorButton.hide()
 	emit_signal("start_game")

+ 1 - 28
HUD.tscn

@@ -1,4 +1,4 @@
-[gd_scene load_steps=14 format=2]
+[gd_scene load_steps=10 format=2]
 
 [ext_resource path="res://HUD.gd" type="Script" id=1]
 [ext_resource path="res://dodge_assets/art/map_set.png" type="Texture" id=2]
@@ -19,19 +19,6 @@ font_path = "res://dodge_assets/fonts/Xolonium-Regular.ttf"
 size = 80
 font_data = SubResource( 3 )
 
-[sub_resource type="DynamicFontData" id=5]
-font_path = "res://dodge_assets/fonts/Xolonium-Regular.ttf"
-
-[sub_resource type="DynamicFont" id=6]
-size = 32
-font_data = SubResource( 5 )
-
-[sub_resource type="InputEventAction" id=7]
-action = "ui_select"
-
-[sub_resource type="ShortCut" id=8]
-shortcut = SubResource( 7 )
-
 [sub_resource type="AtlasTexture" id=9]
 flags = 4
 atlas = ExtResource( 2 )
@@ -68,19 +55,6 @@ text = "Dodge the creeps!"
 align = 1
 autowrap = true
 
-[node name="StartButton" type="Button" parent="."]
-anchor_left = 0.5
-anchor_top = 1.0
-anchor_right = 0.5
-anchor_bottom = 1.0
-margin_left = -172.0
-margin_top = -200.0
-margin_right = 172.0
-margin_bottom = -100.0
-custom_fonts/font = SubResource( 6 )
-shortcut = SubResource( 8 )
-text = "Start"
-
 [node name="MessageTimer" type="Timer" parent="."]
 wait_time = 2.15
 one_shot = true
@@ -95,6 +69,5 @@ texture_pressed = SubResource( 10 )
 texture_hover = SubResource( 11 )
 expand = true
 stretch_mode = 4
-[connection signal="pressed" from="StartButton" to="." method="_on_StartButton_pressed"]
 [connection signal="timeout" from="MessageTimer" to="." method="_on_MessageTimer_timeout"]
 [connection signal="pressed" from="ColorButton" to="." method="_on_StartButton_pressed"]

+ 1 - 1
Main.tscn

@@ -56,7 +56,7 @@ stream = ExtResource( 6 )
 stream = ExtResource( 7 )
 [connection signal="timeout" from="Main/MobTimer" to="Main" method="_on_MobTimer_timeout"]
 [connection signal="timeout" from="Main/ScoreTimer" to="Main" method="_on_ScoreTimer_timeout"]
-[connection signal="timeout" from="Main/StartTimer" to="Main/Player" method="spawn"]
 [connection signal="timeout" from="Main/StartTimer" to="Main" method="_on_StartTimer_timeout"]
+[connection signal="timeout" from="Main/StartTimer" to="Main/Player" method="spawn"]
 [connection signal="hit" from="Main/Player" to="Main" method="game_over"]
 [connection signal="start_game" from="Main/HUD" to="Main" method="new_game"]