Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(menu): Add game over scene #60

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions resources/localization/MenuTranslations.csv
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ WEAPON_SWORD,Sword,Épée
WEAPON_ATTRIBUTE_DAMAGE,Damage,Dégats
WEAPON_ATTRIBUTE_RANGE,Range,Portée
WEAPON_ATTRIBUTE_ATTACK_SPEED,Attack Speed,Vitesse d'attaque
DEATH_TEXT,You are dead...,Vous êtes mort
DEATH_TEXT,You are dead,Vous êtes mort
RESPAWN_TEXT,Respawn in...,Réapparition dans...
SECOND_TEXT,second(s),seconde(s)
SECOND_TEXT,second(s),seconde(s)
GAME_OVER_TITLE,Game Over,Perdu !
GAME_OVER_RETRY,Retry,Réessayer
GAME_OVER_QUIT,Quit,Quitter
Binary file modified resources/localization/MenuTranslations.en.translation
Binary file not shown.
Binary file modified resources/localization/MenuTranslations.fr.translation
Binary file not shown.
7 changes: 7 additions & 0 deletions scenes/menus/gameOver/GameOver.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
extends Control

func _on_retry_pressed() -> void:
print("Nothing to do here ! (for now)")

func _on_quit_pressed() -> void:
get_tree().quit()
Comment on lines +1 to +7
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it shown somewhere?

47 changes: 47 additions & 0 deletions scenes/menus/gameOver/GameOver.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[gd_scene load_steps=2 format=3 uid="uid://bvpukupq1sg2m"]

[ext_resource type="Script" path="res://scenes/menus/gameOver/GameOver.gd" id="1_uppha"]

[node name="GameOver" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_uppha")

[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2

[node name="CenterContainer" type="CenterContainer" parent="MarginContainer"]
layout_mode = 2

[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/CenterContainer"]
layout_mode = 2
theme_override_constants/separation = 64

[node name="Label" type="Label" parent="MarginContainer/CenterContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 32
text = "GAME_OVER_TITLE"

[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/CenterContainer/VBoxContainer"]
layout_mode = 2
theme_override_constants/separation = 12

[node name="Retry" type="Button" parent="MarginContainer/CenterContainer/VBoxContainer/VBoxContainer"]
layout_mode = 2
text = "GAME_OVER_RETRY"

[node name="Quit" type="Button" parent="MarginContainer/CenterContainer/VBoxContainer/VBoxContainer"]
layout_mode = 2
text = "GAME_OVER_QUIT"

[connection signal="pressed" from="MarginContainer/CenterContainer/VBoxContainer/VBoxContainer/Retry" to="." method="_on_retry_pressed"]
[connection signal="pressed" from="MarginContainer/CenterContainer/VBoxContainer/VBoxContainer/Quit" to="." method="_on_quit_pressed"]