adds game over credits (#74)

## Changes
- Adds game over credits

Reviewed-on: gymkhana/gymkhana#74
Reviewed-by: Eneko Nieto <eneko@eneko.ovh>
Co-authored-by: oier <oierbravo@gmail.com>
Co-committed-by: oier <oierbravo@gmail.com>
This commit is contained in:
2024-11-02 00:59:37 +01:00
committed by Oier Bravo
parent 62e07c83fe
commit f142ea1b5d
20 changed files with 632 additions and 27 deletions

View File

@@ -0,0 +1,11 @@
extends Button
# Called when the node enters the scene tree for the first time.
func _ready():
self.visible = false
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
if(escoria.globals_manager.get_global("turno_cocina_creditos_return_to_menu_visible")):
self.visible = true

View File

@@ -0,0 +1,27 @@
extends Node2D
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
func _on_scrollingText_finished():
escoria.globals_manager.set_global("turno_cocina_creditos_return_to_menu_visible", true)
pass # Replace with function body.
func _on_Button_button_up():
escoria.game_scene.show_main_menu()
pass # Replace with function body.

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -0,0 +1,16 @@
extends Node2D
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass

View File

@@ -0,0 +1,56 @@
[gd_scene load_steps=9 format=2]
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_room.gd" type="Script" id=1]
[ext_resource path="res://gymkhana/characters/oier/oier.tscn" type="PackedScene" id=2]
[ext_resource path="res://gymkhana/rooms/turno_cocina/creditos/assets/background.png" type="Texture" id=3]
[ext_resource path="res://gymkhana/rooms/turno_cocina/creditos/scrollingText.tscn" type="PackedScene" id=4]
[ext_resource path="res://gymkhana/characters/eneko/eneko_smoking.tscn" type="PackedScene" id=5]
[ext_resource path="res://gymkhana/logo-small.png" type="Texture" id=6]
[ext_resource path="res://gymkhana/rooms/turno_cocina/creditos/SceneHandler.gd" type="Script" id=7]
[ext_resource path="res://gymkhana/rooms/turno_cocina/creditos/RestartGameButton.gd" type="Script" id=8]
[node name="ESCRoom2" type="Node2D"]
script = ExtResource( 1 )
global_id = "turno_cocina_creditos"
esc_script = "res://gymkhana/rooms/turno_cocina/creditos/esc/creditos.esc"
player_scene = ExtResource( 2 )
camera_limits = [ Rect2( 0, 0, 1280, 577 ) ]
editor_debug_mode = 1
[node name="background" type="Sprite" parent="."]
position = Vector2( 644.5, 372.812 )
scale = Vector2( 1.01797, 1.29008 )
texture = ExtResource( 3 )
[node name="scrollingText" parent="." instance=ExtResource( 4 )]
margin_left = 368.0
margin_top = 764.0
margin_right = 933.0
margin_bottom = 1201.0
[node name="ESCPlayerWithTooltip" parent="." instance=ExtResource( 2 )]
position = Vector2( 175, 532 )
global_id = "oier_head"
[node name="ESCPlayerWithTooltip2" parent="." instance=ExtResource( 5 )]
position = Vector2( 1093, 480 )
global_id = "eneko_head"
[node name="Button" type="Button" parent="."]
margin_left = 495.0
margin_top = 486.0
margin_right = 845.0
margin_bottom = 612.0
text = "Volver a menu"
script = ExtResource( 8 )
[node name="Logo-small" type="Sprite" parent="Button"]
position = Vector2( 176.25, -190.5 )
scale = Vector2( 1.01504, 1.00333 )
texture = ExtResource( 6 )
[node name="Node2D" type="Node2D" parent="."]
script = ExtResource( 7 )
[connection signal="finished" from="scrollingText" to="Node2D" method="_on_scrollingText_finished"]
[connection signal="button_up" from="Button" to="Node2D" method="_on_Button_button_up"]

View File

@@ -0,0 +1,23 @@
:setup
play_snd res://gymkhana/sounds/intro_menu_loop.ogg _music
accept_input NONE
set_gui_visible false
set_global turno_cocina_creditos_return_to_menu_evisible false
set_interactive eneko_head false
transition fade_black out 2.0
:ready
set_gui_visible false
set_global game_over true
transition fade_black in 2.0
say oier_head "No se me ocurre nada que decir."
say eneko_head "A mi tampoco."
say eneko_head "Fumamos!?"
say oier_head "Me pasas un filttro?"
say eneko_head "..."
say eneko_head "¡%&@@4!"
say oier_head "Ok"
say oier_head "Lanzamos los creditos?"
say eneko_head "Daleee!"
set_global turno_credits_rolling true

View File

@@ -0,0 +1,14 @@
extends VBoxContainer
signal finished
func _ready():
pass # Replace with function body.
func _process(delta):
var size = self.get_global_rect().size
if escoria.globals_manager.get_global("turno_credits_rolling"):
self.set_position(self.get_position() + Vector2(0, -1))
if self.get_position().y < 0 - size.y:
escoria.globals_manager.set_global("turno_credits_rolling", false)
emit_signal("finished")

View File

@@ -0,0 +1,59 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://gymkhana/logo-small.png" type="Texture" id=1]
[ext_resource path="res://gymkhana/rooms/turno_cocina/creditos/scrollingText.gd" type="Script" id=2]
[node name="scrollingText" type="VBoxContainer"]
margin_left = 357.0
margin_right = 922.0
margin_bottom = 437.0
script = ExtResource( 2 )
[node name="LabelContainer" type="HBoxContainer" parent="."]
margin_right = 565.0
margin_bottom = 133.0
[node name="margin" type="MarginContainer" parent="LabelContainer"]
margin_right = 280.0
margin_bottom = 65.0
size_flags_horizontal = 3
size_flags_vertical = 0
[node name="Titles" type="Label" parent="LabelContainer/margin"]
margin_right = 280.0
margin_bottom = 65.0
size_flags_horizontal = 3
size_flags_vertical = 0
text = "Un poco de todo:
Agradecimientos:"
align = 2
uppercase = true
[node name="margin2" type="MarginContainer" parent="LabelContainer"]
margin_left = 284.0
margin_right = 565.0
margin_bottom = 133.0
size_flags_horizontal = 3
size_flags_vertical = 0
[node name="Names" type="Label" parent="LabelContainer/margin2"]
margin_right = 281.0
margin_bottom = 133.0
size_flags_horizontal = 3
size_flags_vertical = 0
text = "Eneko
Oier
Miette
Niko
Piko
Urtzi"
[node name="TextureRect" type="TextureRect" parent="."]
margin_top = 137.0
margin_right = 565.0
margin_bottom = 437.0
texture = ExtResource( 1 )