Skip to content

Commit

Permalink
[ench] update RGT version
Browse files Browse the repository at this point in the history
  • Loading branch information
theludovyc committed Feb 8, 2025
1 parent 04972e6 commit 40155eb
Show file tree
Hide file tree
Showing 52 changed files with 1,499 additions and 274 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion Scene/RGT/bootstrap.tscn → RGT/Bootstrap/bootstrap.tscn
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://cblhpjvwon5kf"]

[ext_resource type="Script" path="res://Script/RGT/bootstrap.gd" id="1_gj3pc"]
[ext_resource type="Script" path="res://RGT/Bootstrap/bootstrap.gd" id="1_gj3pc"]

[node name="Bootstrap" type="Node"]
script = ExtResource("1_gj3pc")
42 changes: 42 additions & 0 deletions RGT/Credits/Credits.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[gd_scene load_steps=2 format=3 uid="uid://t2dui8ppm3a4"]

[ext_resource type="Script" path="res://RGT/Credits/RichTextLabel.gd" id="2_clwmv"]

[node name="Credits" type="ScrollContainer"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
horizontal_scroll_mode = 0
vertical_scroll_mode = 2

[node name="RichTextLabel" type="RichTextLabel" parent="."]
layout_mode = 2
size_flags_horizontal = 3
bbcode_enabled = true
text = "[center][font_size=18][b]Game Credits[/b][/font_size][/center]
[font_size=16][b]Developers[/b][/font_size]
- Lead Developer: [i]John Smith[/i]
- Assistant Developer: [i]Emily Johnson[/i]
- Graphics Designer: [i]Michael Brown[/i]
- Sound Engineer: [i]Sarah Davis[/i]
[font_size=16][b]Special Thanks[/b][/font_size]
- Our supportive community for their valuable feedback and suggestions.
- Friends and family for their unwavering support during development.
- [i]Special mention to OpenAI for their incredible language model technology![/i]
[font_size=16][b]Legal[/b][/font_size]
- This game contains assets licensed under Creative Commons and public domain.
- Some sound effects obtained from [url=https://www.freesound.org/]freesound.org[/url].
- All rights reserved for original content not explicitly mentioned.
[font_size=14][b] 2024 Rakugo Team. [/b][/font_size]
"
fit_content = true
scroll_active = false
script = ExtResource("2_clwmv")

[connection signal="meta_clicked" from="RichTextLabel" to="RichTextLabel" method="_on_RichTextLabel_meta_clicked"]
5 changes: 5 additions & 0 deletions RGT/Credits/RichTextLabel.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
extends RichTextLabel

func _on_RichTextLabel_meta_clicked(meta:String):
if meta.begins_with("https://"):
var _err = OS.shell_open(meta)
42 changes: 42 additions & 0 deletions RGT/EndMenu/EndMenu.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
extends Control

const GameOver_Text = "You lose..."
const Win_Text = "You won!"

const confirm_menu = "Go back to Main Menu ?"
const confirm_restart = "Restart the Game ?"
const confirm_quit = "Quit the Game ?"

@onready var end_message = %EndMessage
@onready var confirm_dialog = %ConfirmDialog
@onready var restart_button = %RestartButton

func _ready():
if OS.has_feature("web"):
%ExitButton.hide()

func set_win():
end_message.text = Win_Text

func set_gameover():
end_message.text = GameOver_Text

func _on_restart_button_pressed():
confirm_dialog.popup_confirm(confirm_restart, _on_confirm_restart_confirmed)

func _on_exit_button_pressed():
confirm_dialog.popup_confirm(confirm_quit, _on_confirm_exit_confirmed)

func _on_main_menu_button_pressed():
confirm_dialog.popup_confirm(confirm_menu, _on_confirm_main_menu_confirmed)

func _on_confirm_restart_confirmed():
hide()
SceneLoader.change_scene(get_tree().current_scene.scene_file_path)

func _on_confirm_main_menu_confirmed():
hide()
SceneLoader.change_scene(RGT_Globals.main_menu_setting)

func _on_confirm_exit_confirmed():
get_tree().quit()
79 changes: 79 additions & 0 deletions RGT/EndMenu/EndMenu.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
[gd_scene load_steps=3 format=3 uid="uid://cp3p3kqcjh0me"]

[ext_resource type="Script" path="res://RGT/EndMenu/EndMenu.gd" id="2"]
[ext_resource type="PackedScene" uid="uid://dnlyj8r7kuvas" path="res://RGT/RGT_Dialogs/RGT_ConfirmationDialog.tscn" id="2_6mgxw"]

[node name="EndMenu" type="Panel"]
process_mode = 2
custom_minimum_size = Vector2(410, 240)
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("2")

[node name="PanelContainer" type="PanelContainer" parent="."]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.5
anchor_top = 0.4
anchor_right = 0.5
anchor_bottom = 0.6
offset_left = -196.0
offset_top = -33.5
offset_right = 196.0
offset_bottom = 33.5
grow_horizontal = 2
grow_vertical = 2
metadata/_edit_use_anchors_ = true

[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer"]
layout_mode = 2
alignment = 1

[node name="EndMessage" type="Label" parent="PanelContainer/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_vertical = 3
text = "Text"
horizontal_alignment = 1
vertical_alignment = 1

[node name="MarginContainer" type="MarginContainer" parent="PanelContainer/VBoxContainer"]
layout_mode = 2
theme_override_constants/margin_left = 4
theme_override_constants/margin_top = 4
theme_override_constants/margin_right = 4
theme_override_constants/margin_bottom = 4

[node name="ButtonsContainer" type="HBoxContainer" parent="PanelContainer/VBoxContainer/MarginContainer"]
layout_mode = 2
theme_override_constants/separation = 4
alignment = 1

[node name="MainMenuButton" type="Button" parent="PanelContainer/VBoxContainer/MarginContainer/ButtonsContainer"]
unique_name_in_owner = true
custom_minimum_size = Vector2(128, 40)
layout_mode = 2
text = "Main Menu"

[node name="RestartButton" type="Button" parent="PanelContainer/VBoxContainer/MarginContainer/ButtonsContainer"]
unique_name_in_owner = true
custom_minimum_size = Vector2(128, 40)
layout_mode = 2
text = "Restart"

[node name="ExitButton" type="Button" parent="PanelContainer/VBoxContainer/MarginContainer/ButtonsContainer"]
unique_name_in_owner = true
custom_minimum_size = Vector2(128, 40)
layout_mode = 2
text = "Exit Game"

[node name="ConfirmDialog" parent="." instance=ExtResource("2_6mgxw")]
unique_name_in_owner = true

[connection signal="visibility_changed" from="." to="." method="_on_visibility_changed"]
[connection signal="pressed" from="PanelContainer/VBoxContainer/MarginContainer/ButtonsContainer/MainMenuButton" to="." method="_on_main_menu_button_pressed"]
[connection signal="pressed" from="PanelContainer/VBoxContainer/MarginContainer/ButtonsContainer/RestartButton" to="." method="_on_restart_button_pressed"]
[connection signal="pressed" from="PanelContainer/VBoxContainer/MarginContainer/ButtonsContainer/ExitButton" to="." method="_on_exit_button_pressed"]
8 changes: 8 additions & 0 deletions RGT/Game/Sprite2D.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends Sprite2D

#remove me
#I permit to see if the pause is effective

func _process(delta):
rotate(delta / 2.0)
pass
38 changes: 38 additions & 0 deletions RGT/Game/game.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
extends Node
class_name Game

@onready var pause_menu = %PauseMenu
@onready var end_menu = %EndMenu

@onready var pause_checker_sprite = $PauseChecker

func _ready() -> void:
if SaveHelper.save_file_name_to_load.is_empty():
return

if not SaveHelper.load_saved_file_name() == OK:
return

pause_checker_sprite.rotation = \
SaveHelper.last_loaded_data.get("pause_checker_sprite_rot", 0)

func _process(_delta):
if pause_menu.visible == false and Input.is_action_just_pressed("ui_cancel"):
pause_menu.show()
pause_menu.set_process(true)
get_tree().paused = true

func _on_win():
end_menu.set_win()
end_menu.show()
get_tree().paused = true

func _on_gameover():
end_menu.set_gameover()
end_menu.show()
get_tree().paused = true

func _on_pause_menu_ask_to_save() -> void:
pause_menu.save_this_please({
"pause_checker_sprite_rot":pause_checker_sprite.rotation
})
61 changes: 61 additions & 0 deletions RGT/Game/game.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
[gd_scene load_steps=6 format=3 uid="uid://d1flo1brh3p4c"]

[ext_resource type="Script" path="res://RGT/Game/game.gd" id="1_o2piy"]
[ext_resource type="PackedScene" uid="uid://cdwvtbtwmrqbn" path="res://RGT/PauseMenu/PauseMenu.tscn" id="2_hcope"]
[ext_resource type="Texture2D" path="res://icon.svg" id="3_6luik"]
[ext_resource type="PackedScene" uid="uid://cp3p3kqcjh0me" path="res://RGT/EndMenu/EndMenu.tscn" id="3_yfekm"]
[ext_resource type="Script" path="res://RGT/Game/Sprite2D.gd" id="4_lltyx"]

[node name="Game" type="Node"]
script = ExtResource("1_o2piy")

[node name="GUI" type="CanvasLayer" parent="."]

[node name="PauseMenu" parent="GUI" instance=ExtResource("2_hcope")]
unique_name_in_owner = true
visible = false

[node name="EndMenu" parent="GUI" instance=ExtResource("3_yfekm")]
unique_name_in_owner = true
visible = false

[node name="RemoveMe" type="VBoxContainer" parent="."]
anchors_preset = 14
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
grow_horizontal = 2
grow_vertical = 2

[node name="Label" type="Label" parent="RemoveMe"]
layout_mode = 2
text = "This is the fake game scene.
You can update it.
Or replace it, in this case do not forget to update the project settings.
(You should activate advanced settings to see the Addons sub-category in Application)
Press Esc to open the pause menu.
Here you can choose to win or loose:"
horizontal_alignment = 1

[node name="HBoxContainer" type="HBoxContainer" parent="RemoveMe"]
layout_mode = 2
alignment = 1

[node name="WinButton" type="Button" parent="RemoveMe/HBoxContainer"]
layout_mode = 2
text = "Win"

[node name="LooseButton" type="Button" parent="RemoveMe/HBoxContainer"]
layout_mode = 2
text = "Loose"

[node name="PauseChecker" type="Sprite2D" parent="."]
position = Vector2(637, 143)
texture = ExtResource("3_6luik")
script = ExtResource("4_lltyx")

[connection signal="ask_to_save" from="GUI/PauseMenu" to="." method="_on_pause_menu_ask_to_save"]
[connection signal="pressed" from="RemoveMe/HBoxContainer/WinButton" to="." method="_on_win"]
[connection signal="pressed" from="RemoveMe/HBoxContainer/LooseButton" to="." method="_on_gameover"]
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://choevp6ilq78t"]

[ext_resource type="Script" path="res://Script/RGT/LoadSaveMenu/load_save_menu.gd" id="1_nyk5l"]
[ext_resource type="Script" path="res://RGT/LoadSaveMenu/load_save_menu.gd" id="1_nyk5l"]

[node name="LoadSaveMenu" type="ScrollContainer"]
anchors_preset = 15
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ signal no_save_to_load
const confirm_load = "Are you sure you want to load this save?\n"
const confirm_delete = "Are you sure you want to delete this save ?\n"

var SavePanel = preload("res://Scene/RGT/savePanelContainer.tscn")
var SavePanel = preload("res://RGT/LoadSaveMenu/savePanelContainer.tscn")

@onready var vbox_container = $VBoxContainer

Expand All @@ -22,8 +22,7 @@ var current_save_panel:Node = null

# Called when the node enters the scene tree for the first time.
func _ready() -> void:
if SaveHelper.save_file_names.is_empty():
SaveHelper.update_save_file_names()
SaveHelper.update_save_file_names()

if SaveHelper.save_file_names.is_empty():
push_warning("No save to load")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://wal8k0gos06y"]

[ext_resource type="Script" path="res://Script/RGT/LoadSaveMenu/save_panel_container.gd" id="1_np60c"]
[ext_resource type="Script" path="res://RGT/LoadSaveMenu/save_panel_container.gd" id="1_np60c"]

[node name="SavePanelContainer" type="PanelContainer"]
script = ExtResource("1_np60c")
Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 40155eb

Please sign in to comment.