diff --git a/Assets/CONTROLS BUTTON.png b/Assets/CONTROLS BUTTON.png new file mode 100644 index 0000000..d495530 Binary files /dev/null and b/Assets/CONTROLS BUTTON.png differ diff --git a/Assets/CONTROLS BUTTON.png.import b/Assets/CONTROLS BUTTON.png.import new file mode 100644 index 0000000..bcb49a4 --- /dev/null +++ b/Assets/CONTROLS BUTTON.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/CONTROLS BUTTON.png-63721ee21b549871543891f3e65777b2.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/CONTROLS BUTTON.png" +dest_files=[ "res://.import/CONTROLS BUTTON.png-63721ee21b549871543891f3e65777b2.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/Assets/CONTROLS.png b/Assets/CONTROLS.png new file mode 100644 index 0000000..8e1ca5b Binary files /dev/null and b/Assets/CONTROLS.png differ diff --git a/Assets/CONTROLS.png.import b/Assets/CONTROLS.png.import new file mode 100644 index 0000000..3437178 --- /dev/null +++ b/Assets/CONTROLS.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/CONTROLS.png-0e40a43aa2bc2dfcadcdf34d67e9cba5.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/CONTROLS.png" +dest_files=[ "res://.import/CONTROLS.png-0e40a43aa2bc2dfcadcdf34d67e9cba5.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/Assets/CROIXQUIT.png b/Assets/CROIXQUIT.png new file mode 100644 index 0000000..06e21c9 Binary files /dev/null and b/Assets/CROIXQUIT.png differ diff --git a/Assets/CROIXQUIT.png.import b/Assets/CROIXQUIT.png.import new file mode 100644 index 0000000..f113720 --- /dev/null +++ b/Assets/CROIXQUIT.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/CROIXQUIT.png-20e1bff34bafd878ea4878ea0dc0e9f8.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/CROIXQUIT.png" +dest_files=[ "res://.import/CROIXQUIT.png-20e1bff34bafd878ea4878ea0dc0e9f8.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/Assets/Ecran titre Paintkilller.png b/Assets/Ecran titre Paintkilller.png new file mode 100644 index 0000000..d665f2a Binary files /dev/null and b/Assets/Ecran titre Paintkilller.png differ diff --git a/Assets/Ecran titre Paintkilller.png.import b/Assets/Ecran titre Paintkilller.png.import new file mode 100644 index 0000000..ab9e074 --- /dev/null +++ b/Assets/Ecran titre Paintkilller.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Ecran titre Paintkilller.png-14baa029673e912baa08491ea67c3d8e.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Ecran titre Paintkilller.png" +dest_files=[ "res://.import/Ecran titre Paintkilller.png-14baa029673e912baa08491ea67c3d8e.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/Assets/PAINT1.png b/Assets/PAINT1.png new file mode 100644 index 0000000..4ac401f Binary files /dev/null and b/Assets/PAINT1.png differ diff --git a/Assets/PAINT1.png.import b/Assets/PAINT1.png.import new file mode 100644 index 0000000..5e2e49f --- /dev/null +++ b/Assets/PAINT1.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/PAINT1.png-44ca390e20a72aa159f45d79adaa63ca.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/PAINT1.png" +dest_files=[ "res://.import/PAINT1.png-44ca390e20a72aa159f45d79adaa63ca.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/Assets/QUIT BUTTON.png b/Assets/QUIT BUTTON.png new file mode 100644 index 0000000..44b17fe Binary files /dev/null and b/Assets/QUIT BUTTON.png differ diff --git a/Assets/QUIT BUTTON.png.import b/Assets/QUIT BUTTON.png.import new file mode 100644 index 0000000..1d31537 --- /dev/null +++ b/Assets/QUIT BUTTON.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/QUIT BUTTON.png-10bf03934e59d556950562e60262de79.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/QUIT BUTTON.png" +dest_files=[ "res://.import/QUIT BUTTON.png-10bf03934e59d556950562e60262de79.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/Assets/QUIT WINNING.png b/Assets/QUIT WINNING.png new file mode 100644 index 0000000..8dd34e2 Binary files /dev/null and b/Assets/QUIT WINNING.png differ diff --git a/Assets/QUIT WINNING.png.import b/Assets/QUIT WINNING.png.import new file mode 100644 index 0000000..d75320f --- /dev/null +++ b/Assets/QUIT WINNING.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/QUIT WINNING.png-3551c9935981f8ccea98576fcfe4ad99.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/QUIT WINNING.png" +dest_files=[ "res://.import/QUIT WINNING.png-3551c9935981f8ccea98576fcfe4ad99.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/Assets/RESTART WINNING.png b/Assets/RESTART WINNING.png new file mode 100644 index 0000000..b587a92 Binary files /dev/null and b/Assets/RESTART WINNING.png differ diff --git a/Assets/RESTART WINNING.png.import b/Assets/RESTART WINNING.png.import new file mode 100644 index 0000000..8039243 --- /dev/null +++ b/Assets/RESTART WINNING.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/RESTART WINNING.png-1e45ff6cfb6f030f56114a3f8ff08fba.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/RESTART WINNING.png" +dest_files=[ "res://.import/RESTART WINNING.png-1e45ff6cfb6f030f56114a3f8ff08fba.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/Assets/START BUTTON.png b/Assets/START BUTTON.png new file mode 100644 index 0000000..08ff190 Binary files /dev/null and b/Assets/START BUTTON.png differ diff --git a/Assets/START BUTTON.png.import b/Assets/START BUTTON.png.import new file mode 100644 index 0000000..00a2381 --- /dev/null +++ b/Assets/START BUTTON.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/START BUTTON.png-e4c225b72724e2435af095d0ad6fa144.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/START BUTTON.png" +dest_files=[ "res://.import/START BUTTON.png-e4c225b72724e2435af095d0ad6fa144.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/Assets/WINNER.png b/Assets/WINNER.png new file mode 100644 index 0000000..59b0074 Binary files /dev/null and b/Assets/WINNER.png differ diff --git a/Assets/WINNER.png.import b/Assets/WINNER.png.import new file mode 100644 index 0000000..f7492d0 --- /dev/null +++ b/Assets/WINNER.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/WINNER.png-a36a13b6de235e00059406a858cf6571.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/WINNER.png" +dest_files=[ "res://.import/WINNER.png-a36a13b6de235e00059406a858cf6571.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/Scene/EndGameWindow.tscn b/Scene/EndGameWindow.tscn index c81baed..17089ca 100644 --- a/Scene/EndGameWindow.tscn +++ b/Scene/EndGameWindow.tscn @@ -1,8 +1,11 @@ -[gd_scene load_steps=4 format=2] +[gd_scene load_steps=7 format=2] [ext_resource path="res://Scripts/EndGameWindow.gd" type="Script" id=1] [ext_resource path="res://Font/COMIC.tres" type="DynamicFont" id=2] [ext_resource path="res://Sounds/PaintJamEndGameTheme.wav" type="AudioStream" id=3] +[ext_resource path="res://Assets/QUIT WINNING.png" type="Texture" id=4] +[ext_resource path="res://Assets/WINNER.png" type="Texture" id=5] +[ext_resource path="res://Assets/RESTART WINNING.png" type="Texture" id=6] [node name="CanvasLayer" type="CanvasLayer"] layer = 100 @@ -29,43 +32,17 @@ __meta__ = { "_edit_use_anchors_": false } -[node name="ColorRect" type="ColorRect" parent="Window"] -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -267.0 -margin_top = -254.0 -margin_right = 256.0 -margin_bottom = 82.0 -color = Color( 0, 0, 0, 1 ) -__meta__ = { -"_edit_use_anchors_": false -} +[node name="WinnerPopUp" type="Sprite" parent="Window"] +position = Vector2( 951.212, 510.746 ) +texture = ExtResource( 5 ) -[node name="Title" type="Label" parent="Window/ColorRect"] +[node name="WinnerName" type="Label" parent="Window/WinnerPopUp"] anchor_left = 0.5 anchor_right = 0.5 -margin_left = -60.5 -margin_top = 28.0 -margin_right = 83.5 -margin_bottom = 80.0 -custom_fonts/font = ExtResource( 2 ) -text = "Winner:" -align = 1 -valign = 1 -autowrap = true -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="WinnerName" type="Label" parent="Window/ColorRect"] -anchor_left = 0.5 -anchor_right = 0.5 -margin_left = -53.5 -margin_top = 130.0 -margin_right = 70.5 -margin_bottom = 182.0 +margin_left = -876.595 +margin_top = 59.2959 +margin_right = -673.595 +margin_bottom = 111.296 custom_fonts/font = ExtResource( 2 ) text = "AZER" align = 1 @@ -75,33 +52,28 @@ __meta__ = { "_edit_use_anchors_": false } -[node name="VBoxContainer" type="HBoxContainer" parent="Window/ColorRect"] -anchor_top = 1.0 -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_top = -81.0 -margin_bottom = -6.0 -custom_constants/separation = 25 +[node name="RestartButton" type="TextureButton" parent="Window/WinnerPopUp"] +margin_left = -403.089 +margin_top = 187.089 +margin_right = 11.9109 +margin_bottom = 328.089 +texture_normal = ExtResource( 6 ) +__meta__ = { +"_edit_use_anchors_": false +} -[node name="RestartButton" type="Button" parent="Window/ColorRect/VBoxContainer"] -margin_right = 249.0 -margin_bottom = 75.0 -size_flags_horizontal = 3 -size_flags_vertical = 3 -custom_fonts/font = ExtResource( 2 ) -text = "Restart" +[node name="QuitButton" type="TextureButton" parent="Window/WinnerPopUp"] +margin_left = 39.6559 +margin_top = 184.284 +margin_right = 432.656 +margin_bottom = 315.284 +texture_normal = ExtResource( 4 ) +__meta__ = { +"_edit_use_anchors_": false +} -[node name="QuitButton" type="Button" parent="Window/ColorRect/VBoxContainer"] -margin_left = 274.0 -margin_right = 523.0 -margin_bottom = 75.0 -size_flags_horizontal = 3 -size_flags_vertical = 3 -custom_fonts/font = ExtResource( 2 ) -text = "Quit" - -[node name="EndGameTheme" type="AudioStreamPlayer2D" parent="."] +[node name="EndGameTheme" type="AudioStreamPlayer" parent="."] pause_mode = 2 stream = ExtResource( 3 ) -[connection signal="pressed" from="Window/ColorRect/VBoxContainer/RestartButton" to="Window" method="_on_RestartButton_pressed"] -[connection signal="pressed" from="Window/ColorRect/VBoxContainer/QuitButton" to="Window" method="_on_QuitButton_pressed"] +[connection signal="pressed" from="Window/WinnerPopUp/RestartButton" to="Window" method="_on_RestartButton_pressed"] +[connection signal="pressed" from="Window/WinnerPopUp/QuitButton" to="Window" method="_on_QuitButton_pressed"] diff --git a/Scene/GameMap.tscn b/Scene/GameMap.tscn index 45eb56b..57b8e78 100644 --- a/Scene/GameMap.tscn +++ b/Scene/GameMap.tscn @@ -122,6 +122,6 @@ position = Vector2( 199.123, 592.532 ) ]] position = Vector2( 1730.27, 580.843 ) -[node name="MainTheme" type="AudioStreamPlayer2D" parent="."] +[node name="MainTheme" type="AudioStreamPlayer" parent="."] stream = ExtResource( 6 ) autoplay = true diff --git a/Scene/Player.tscn b/Scene/Player.tscn index 1a8222c..aa1432f 100644 --- a/Scene/Player.tscn +++ b/Scene/Player.tscn @@ -310,5 +310,5 @@ scale = Vector2( 1.1136, 1.2906 ) z_index = -1 texture = ExtResource( 5 ) -[node name="PickupPlayer" type="AudioStreamPlayer2D" parent="."] +[node name="PickupPlayer" type="AudioStreamPlayer" parent="."] stream = ExtResource( 4 ) diff --git a/Scene/TitleScreen.tscn b/Scene/TitleScreen.tscn index bdbe149..23f7721 100644 --- a/Scene/TitleScreen.tscn +++ b/Scene/TitleScreen.tscn @@ -1,53 +1,72 @@ -[gd_scene load_steps=5 format=2] +[gd_scene load_steps=10 format=2] -[ext_resource path="res://Assets/titlescreen.png" type="Texture" id=1] +[ext_resource path="res://Assets/CONTROLS BUTTON.png" type="Texture" id=1] [ext_resource path="res://Scripts/TitleScreen.gd" type="Script" id=2] -[ext_resource path="res://icon.png" type="Texture" id=3] +[ext_resource path="res://Assets/QUIT BUTTON.png" type="Texture" id=3] [ext_resource path="res://Sounds/PaintJamTitleScreen.wav" type="AudioStream" id=4] +[ext_resource path="res://Assets/Ecran titre Paintkilller.png" type="Texture" id=5] +[ext_resource path="res://Assets/START BUTTON.png" type="Texture" id=6] +[ext_resource path="res://Assets/CONTROLS.png" type="Texture" id=7] +[ext_resource path="res://Assets/CROIXQUIT.png" type="Texture" id=8] +[ext_resource path="res://Scripts/Controls.gd" type="Script" id=9] [node name="TitleScreen" type="Node2D"] script = ExtResource( 2 ) -[node name="Sprite" type="Sprite" parent="."] -scale = Vector2( 1.21961, 1.26337 ) -texture = ExtResource( 1 ) +[node name="TitleScreen" type="Sprite" parent="."] +texture = ExtResource( 5 ) centered = false -[node name="MarginContainer" type="MarginContainer" parent="Sprite"] -anchor_right = 1.0 -anchor_bottom = 1.0 -custom_constants/margin_right = 0 -custom_constants/margin_top = 20 -custom_constants/margin_left = 0 -custom_constants/margin_bottom = 20 +[node name="QuitButton" type="TextureButton" parent="TitleScreen"] +margin_left = 1269.34 +margin_top = 828.657 +margin_right = 1661.34 +margin_bottom = 1009.66 +texture_normal = ExtResource( 3 ) __meta__ = { "_edit_use_anchors_": false } -[node name="HBoxContainer" type="HBoxContainer" parent="Sprite/MarginContainer"] -margin_left = 674.0 -margin_top = 771.0 -margin_right = 902.0 -margin_bottom = 835.0 -size_flags_horizontal = 4 -size_flags_vertical = 12 -custom_constants/separation = 100 +[node name="ControlsButton" type="TextureButton" parent="TitleScreen"] +margin_left = 667.99 +margin_top = 826.657 +margin_right = 1244.99 +margin_bottom = 1020.66 +texture_normal = ExtResource( 1 ) +__meta__ = { +"_edit_use_anchors_": false +} -[node name="StartGameButton" type="TextureButton" parent="Sprite/MarginContainer/HBoxContainer"] -margin_right = 64.0 -margin_bottom = 64.0 -size_flags_horizontal = 4 -size_flags_vertical = 8 -texture_normal = ExtResource( 3 ) +[node name="StartButton" type="TextureButton" parent="TitleScreen"] +margin_left = 249.108 +margin_top = 848.87 +margin_right = 639.108 +margin_bottom = 1002.87 +texture_normal = ExtResource( 6 ) +__meta__ = { +"_edit_use_anchors_": false +} -[node name="QuitGameButton" type="TextureButton" parent="Sprite/MarginContainer/HBoxContainer"] -margin_left = 164.0 -margin_right = 228.0 -margin_bottom = 64.0 -texture_normal = ExtResource( 3 ) - -[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."] +[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] stream = ExtResource( 4 ) autoplay = true -[connection signal="pressed" from="Sprite/MarginContainer/HBoxContainer/StartGameButton" to="." method="_on_StartGameButton_pressed"] -[connection signal="pressed" from="Sprite/MarginContainer/HBoxContainer/QuitGameButton" to="." method="_on_QuitGame_pressed"] + +[node name="Controls" type="Sprite" parent="."] +visible = false +texture = ExtResource( 7 ) +centered = false +script = ExtResource( 9 ) + +[node name="TextureButton" type="TextureButton" parent="Controls"] +margin_left = 1596.38 +margin_top = -0.292526 +margin_right = 1766.38 +margin_bottom = 153.707 +texture_normal = ExtResource( 8 ) +__meta__ = { +"_edit_use_anchors_": false +} +[connection signal="pressed" from="TitleScreen/QuitButton" to="." method="_on_QuitButton_pressed"] +[connection signal="pressed" from="TitleScreen/ControlsButton" to="." method="_on_ControlsButton_pressed"] +[connection signal="pressed" from="TitleScreen/StartButton" to="." method="_on_StartButton_pressed"] +[connection signal="pressed" from="Controls/TextureButton" to="Controls" method="_on_TextureButton_pressed"] diff --git a/Scripts/Controls.gd b/Scripts/Controls.gd new file mode 100644 index 0000000..febe9e2 --- /dev/null +++ b/Scripts/Controls.gd @@ -0,0 +1,5 @@ +extends Sprite + +func _on_TextureButton_pressed(): + self.visible = false + get_node("/root/TitleScreen/TitleScreen").visible = true diff --git a/Scripts/EndGameWindow.gd b/Scripts/EndGameWindow.gd index 7567e2f..65ea93b 100644 --- a/Scripts/EndGameWindow.gd +++ b/Scripts/EndGameWindow.gd @@ -5,7 +5,7 @@ func showEndGameWindow(playerName): audioPlayer.play() get_tree().paused = true self.visible = true - get_node("/root/World/CanvasLayer/Window/ColorRect/WinnerName").text = playerName + get_node("/root/World/CanvasLayer/Window/WinnerPopUp/WinnerName").text = playerName func _on_RestartButton_pressed(): diff --git a/Scripts/TitleScreen.gd b/Scripts/TitleScreen.gd index 611ba4d..fa5c7cf 100644 --- a/Scripts/TitleScreen.gd +++ b/Scripts/TitleScreen.gd @@ -1,7 +1,9 @@ extends Node2D -onready var startGameButton = $Sprite/MarginContainer/HBoxContainer/StartGameButton -onready var quitGameButton = $Sprite/MarginContainer/HBoxContainer/QuitGameButton +onready var startGameButton = $TitleScreen/StartButton +onready var quitGameButton = $TitleScreen/QuitButton +onready var titleScreen = $TitleScreen +onready var controls = $Controls func _ready(): startGameButton.grab_focus() @@ -12,8 +14,12 @@ func _process(_delta): elif quitGameButton.is_hovered(): quitGameButton.grab_focus() -func _on_StartGameButton_pressed(): +func _on_StartButton_pressed(): get_tree().change_scene("res://Scene/GameMap.tscn") -func _on_QuitGame_pressed(): +func _on_QuitButton_pressed(): get_tree().quit() + +func _on_ControlsButton_pressed(): + titleScreen.visible = false + controls.visible = true