Dancing animations, some glitch fixed

This commit is contained in:
2024-11-02 21:39:16 +01:00
parent 6cfa1d1a05
commit 220c390597
19 changed files with 378 additions and 38 deletions

View File

@@ -377,6 +377,7 @@ func hide_ui():
$CanvasLayer/ui.hide() $CanvasLayer/ui.hide()
func show_ui(): func show_ui():
if escoria.room_manager.GLOBAL_CURRENT_SCENE != "turno_cocina_creditos":
$CanvasLayer/ui/HBoxContainer/inventory_ui.show() $CanvasLayer/ui/HBoxContainer/inventory_ui.show()
$CanvasLayer/ui/HBoxContainer/inventory_ui.show_ui() $CanvasLayer/ui/HBoxContainer/inventory_ui.show_ui()
$CanvasLayer/ui.show() $CanvasLayer/ui.show()
@@ -497,6 +498,7 @@ func get_video_player() -> Node:
func play_video(video_file: String) -> void: func play_video(video_file: String) -> void:
hide_ui() hide_ui()
clear_tooltip()
$CanvasLayer/video_player.visible = true $CanvasLayer/video_player.visible = true
$CanvasLayer/video_player.play(video_file) $CanvasLayer/video_player.play(video_file)

View File

@@ -1,7 +1,10 @@
[gd_resource type="Theme" load_steps=5 format=2] [gd_resource type="Theme" load_steps=6 format=2]
[ext_resource path="res://addons/escoria-ui-return-monkey-island/fonts/caslonantique.tres" type="DynamicFont" id=1] [ext_resource path="res://addons/escoria-ui-return-monkey-island/fonts/caslonantique.tres" type="DynamicFont" id=1]
[sub_resource type="StyleBoxFlat" id=4]
bg_color = Color( 0.168627, 0.168627, 0.168627, 0.705882 )
[sub_resource type="StyleBoxFlat" id=1] [sub_resource type="StyleBoxFlat" id=1]
content_margin_left = 4.0 content_margin_left = 4.0
content_margin_right = 4.0 content_margin_right = 4.0
@@ -32,6 +35,7 @@ expand_margin_bottom = 5.0
[resource] [resource]
default_font = ExtResource( 1 ) default_font = ExtResource( 1 )
Button/styles/normal = SubResource( 4 )
Label/colors/font_color = Color( 1, 1, 1, 1 ) Label/colors/font_color = Color( 1, 1, 1, 1 )
Label/colors/font_color_shadow = Color( 0, 0, 0, 0 ) Label/colors/font_color_shadow = Color( 0, 0, 0, 0 )
Label/colors/font_outline_modulate = Color( 1, 0, 0, 1 ) Label/colors/font_outline_modulate = Color( 1, 0, 0, 1 )

View File

@@ -1,6 +1,7 @@
[gd_scene load_steps=5 format=2] [gd_scene load_steps=6 format=2]
[ext_resource path="res://addons/escoria-ui-return-monkey-island/video_player/video_player.gd" type="Script" id=1] [ext_resource path="res://addons/escoria-ui-return-monkey-island/video_player/video_player.gd" type="Script" id=1]
[ext_resource path="res://gymkhana.tres" type="Theme" id=2]
[sub_resource type="VideoStreamTheora" id=1] [sub_resource type="VideoStreamTheora" id=1]
@@ -16,13 +17,15 @@ margin_bottom = 753.0
script = ExtResource( 1 ) script = ExtResource( 1 )
[node name="ColorRect" type="ColorRect" parent="."] [node name="ColorRect" type="ColorRect" parent="."]
margin_right = 1275.0 margin_left = -11.0
margin_bottom = 744.0 margin_top = -3.0
margin_right = 1285.0
margin_bottom = 766.0
color = Color( 0, 0, 0, 1 ) color = Color( 0, 0, 0, 1 )
[node name="VideoPlayer" type="VideoPlayer" parent="."] [node name="VideoPlayer" type="VideoPlayer" parent="."]
margin_right = 1279.0 margin_right = 1279.0
margin_bottom = 747.0 margin_bottom = 771.0
stream = SubResource( 1 ) stream = SubResource( 1 )
expand = false expand = false
@@ -31,10 +34,10 @@ margin_left = 1163.0
margin_top = 680.0 margin_top = 680.0
margin_right = 1250.0 margin_right = 1250.0
margin_bottom = 712.0 margin_bottom = 712.0
theme = ExtResource( 2 )
shortcut_in_tooltip = false shortcut_in_tooltip = false
shortcut = SubResource( 3 ) shortcut = SubResource( 3 )
text = "Saltar video" text = "Saltar video"
flat = true
[connection signal="finished" from="VideoPlayer" to="." method="_on_VideoPlayer_finished"] [connection signal="finished" from="VideoPlayer" to="." method="_on_VideoPlayer_finished"]
[connection signal="pressed" from="Skip" to="." method="_on_Skip_pressed"] [connection signal="pressed" from="Skip" to="." method="_on_Skip_pressed"]

View File

@@ -1,3 +1,16 @@
[gd_resource type="Theme" format=2] [gd_resource type="Theme" load_steps=4 format=2]
[sub_resource type="StyleBoxFlat" id=1]
bg_color = Color( 0.14902, 0.14902, 0.14902, 0.784314 )
[sub_resource type="StyleBoxFlat" id=2]
bg_color = Color( 0.285156, 0.285156, 0.285156, 0.784314 )
[sub_resource type="StyleBoxFlat" id=3]
bg_color = Color( 0.027451, 0.027451, 0.027451, 0.745098 )
[resource] [resource]
Button/styles/focus = SubResource( 1 )
Button/styles/hover = SubResource( 2 )
Button/styles/normal = SubResource( 1 )
Button/styles/pressed = SubResource( 3 )

View File

@@ -52,9 +52,9 @@ custom_data = {
} }
} }
action3_target_texts = { action3_target_texts = {
"turno_cocina_cuchillo": "Amenzar",
"turno_cocina_frontal": "Ofrecer", "turno_cocina_frontal": "Ofrecer",
"turno_cocina_madera": "Ofrecerle leña", "turno_cocina_madera": "Ofrecerle leña"
"turno_cocina_cuchillo": "Amenzar"
} }
target_when_selected_action_is_in = [ "action3" ] target_when_selected_action_is_in = [ "action3" ]
selectable = true selectable = true

View File

@@ -16,7 +16,7 @@ say player "Parece un cuerno de algún animal. Lo usan para llamar a comer."
set_angle player 180 set_angle player 180
stop_snd stop_snd
> [turno_cocina_eneko_cata_ok] > [turno_cocina_eneko_cata_ok]
play_video res://gymkhana/videos/turno_cocina/cuerno_epico.ogv set_gui_visible false
change_scene res://gymkhana/rooms/turno_cocina/creditos/creditos.tscn change_scene res://gymkhana/rooms/turno_cocina/creditos/creditos.tscn
stop stop
play_video res://gymkhana/videos/turno_cocina/cuerno_antes_de_tiempo.ogv play_video res://gymkhana/videos/turno_cocina/cuerno_antes_de_tiempo.ogv

View File

@@ -0,0 +1,38 @@
extends AnimatedSprite
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
var current_index = 0
var current_animation = "idle"
var num_animations = 3
var animations = ["donkey", "disco", "pulp"]
# 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):
escoria.game_scene.clear_tooltip()
if(escoria.globals_manager.get_global("turno_cocina_credits_dancers_visible")):
self.visible = true
if !escoria.globals_manager.get_global("turno_cocina_credits_dancing"):
return
if($Timer.is_stopped()):
$Timer.start()
current_animation = animations[current_index]
if self.animation != current_animation:
play(current_animation)
func _on_Timer_timeout():
current_index += 1
if current_index == num_animations:
current_index = 0

View File

@@ -0,0 +1,144 @@
[gd_scene load_steps=25 format=2]
[ext_resource path="res://addons/escoria-ui-return-monkey-island/esc_item_with_tooltip.gd" type="Script" id=1]
[ext_resource path="res://gymkhana/rooms/turno_cocina/creditos/assets/eneko-donkey-sheet.png" type="Texture" id=2]
[ext_resource path="res://gymkhana/rooms/turno_cocina/creditos/assets/eneko-disco-sheet.png" type="Texture" id=3]
[ext_resource path="res://gymkhana/rooms/turno_cocina/creditos/assets/eneko-pulp-sheet.png" type="Texture" id=4]
[ext_resource path="res://gymkhana/rooms/turno_cocina/creditos/assets/eneko-idle.png" type="Texture" id=5]
[ext_resource path="res://addons/escoria-core/game/core-scripts/resources/esc_animationresource.gd" type="Script" id=6]
[ext_resource path="res://gymkhana/rooms/turno_cocina/creditos/DancingAnimator.gd" type="Script" id=7]
[sub_resource type="Resource" id=17]
script = ExtResource( 6 )
dir_angles = [ ]
directions = [ ]
idles = [ ]
speaks = [ ]
[sub_resource type="CapsuleShape2D" id=1]
radius = 57.0
height = 186.0
[sub_resource type="AtlasTexture" id=2]
flags = 4
atlas = ExtResource( 3 )
region = Rect2( 0, 0, 186, 375 )
[sub_resource type="AtlasTexture" id=3]
flags = 4
atlas = ExtResource( 3 )
region = Rect2( 186, 0, 186, 375 )
[sub_resource type="AtlasTexture" id=4]
flags = 4
atlas = ExtResource( 3 )
region = Rect2( 372, 0, 186, 375 )
[sub_resource type="AtlasTexture" id=5]
flags = 4
atlas = ExtResource( 3 )
region = Rect2( 558, 0, 186, 375 )
[sub_resource type="AtlasTexture" id=6]
flags = 4
atlas = ExtResource( 2 )
region = Rect2( 0, 0, 155, 375 )
[sub_resource type="AtlasTexture" id=7]
flags = 4
atlas = ExtResource( 2 )
region = Rect2( 155, 0, 155, 375 )
[sub_resource type="AtlasTexture" id=15]
flags = 4
atlas = ExtResource( 5 )
region = Rect2( 0, 0, 118, 375 )
[sub_resource type="AtlasTexture" id=8]
flags = 4
atlas = ExtResource( 4 )
region = Rect2( 0, 0, 186, 375 )
[sub_resource type="AtlasTexture" id=9]
flags = 4
atlas = ExtResource( 4 )
region = Rect2( 186, 0, 186, 375 )
[sub_resource type="AtlasTexture" id=10]
flags = 4
atlas = ExtResource( 4 )
region = Rect2( 372, 0, 186, 375 )
[sub_resource type="AtlasTexture" id=11]
flags = 4
atlas = ExtResource( 4 )
region = Rect2( 558, 0, 186, 375 )
[sub_resource type="AtlasTexture" id=12]
flags = 4
atlas = ExtResource( 4 )
region = Rect2( 744, 0, 186, 375 )
[sub_resource type="AtlasTexture" id=13]
flags = 4
atlas = ExtResource( 4 )
region = Rect2( 930, 0, 186, 375 )
[sub_resource type="AtlasTexture" id=16]
flags = 4
atlas = ExtResource( 5 )
region = Rect2( 0, 0, 118, 375 )
[sub_resource type="SpriteFrames" id=14]
animations = [ {
"frames": [ SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ) ],
"loop": true,
"name": "disco",
"speed": 5.0
}, {
"frames": [ SubResource( 6 ), SubResource( 7 ) ],
"loop": true,
"name": "donkey",
"speed": 5.0
}, {
"frames": [ SubResource( 15 ) ],
"loop": true,
"name": "idle",
"speed": 5.0
}, {
"frames": [ SubResource( 8 ), SubResource( 9 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ), SubResource( 13 ) ],
"loop": true,
"name": "pulp",
"speed": 5.0
}, {
"frames": [ SubResource( 16 ) ],
"loop": true,
"name": "speak",
"speed": 5.0
} ]
[node name="EnekoDancing" type="Area2D"]
pause_mode = 1
script = ExtResource( 1 )
global_id = "eneko_dancing"
is_interactive = false
player_orients_on_arrival = false
combine_when_selected_action_is_in = [ ]
dialog_color = Color( 0.584314, 0.490196, 0.270588, 1 )
animations = SubResource( 17 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 1 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
frames = SubResource( 14 )
animation = "speak"
script = ExtResource( 7 )
[node name="Timer" type="Timer" parent="AnimatedSprite"]
wait_time = 6.0
[node name="dialog_position" type="Position2D" parent="."]
position = Vector2( -2, -273 )
[connection signal="timeout" from="AnimatedSprite/Timer" to="AnimatedSprite" method="_on_Timer_timeout"]

View File

@@ -0,0 +1,136 @@
[gd_scene load_steps=23 format=2]
[ext_resource path="res://addons/escoria-ui-return-monkey-island/esc_item_with_tooltip.gd" type="Script" id=1]
[ext_resource path="res://gymkhana/rooms/turno_cocina/creditos/assets/oier-donkey-sheet.png" type="Texture" id=2]
[ext_resource path="res://gymkhana/rooms/turno_cocina/creditos/assets/oier-idle.png" type="Texture" id=3]
[ext_resource path="res://gymkhana/rooms/turno_cocina/creditos/assets/oier-pulp-sheet.png" type="Texture" id=4]
[ext_resource path="res://gymkhana/rooms/turno_cocina/creditos/assets/oier-disco-sheet.png" type="Texture" id=5]
[ext_resource path="res://gymkhana/rooms/turno_cocina/creditos/DancingAnimator.gd" type="Script" id=6]
[sub_resource type="CapsuleShape2D" id=1]
radius = 57.0
height = 186.0
[sub_resource type="AtlasTexture" id=15]
flags = 4
atlas = ExtResource( 5 )
region = Rect2( 0, 0, 185, 375 )
[sub_resource type="AtlasTexture" id=16]
flags = 4
atlas = ExtResource( 5 )
region = Rect2( 185, 0, 185, 375 )
[sub_resource type="AtlasTexture" id=17]
flags = 4
atlas = ExtResource( 5 )
region = Rect2( 370, 0, 185, 375 )
[sub_resource type="AtlasTexture" id=18]
flags = 4
atlas = ExtResource( 5 )
region = Rect2( 555, 0, 185, 375 )
[sub_resource type="AtlasTexture" id=19]
flags = 4
atlas = ExtResource( 2 )
region = Rect2( 0, 0, 188, 375 )
[sub_resource type="AtlasTexture" id=20]
flags = 4
atlas = ExtResource( 2 )
region = Rect2( 188, 0, 188, 375 )
[sub_resource type="AtlasTexture" id=21]
flags = 4
atlas = ExtResource( 3 )
region = Rect2( 0, 0, 117, 375 )
[sub_resource type="AtlasTexture" id=22]
flags = 4
atlas = ExtResource( 4 )
region = Rect2( 0, 0, 177, 375 )
[sub_resource type="AtlasTexture" id=23]
flags = 4
atlas = ExtResource( 4 )
region = Rect2( 177, 0, 177, 375 )
[sub_resource type="AtlasTexture" id=24]
flags = 4
atlas = ExtResource( 4 )
region = Rect2( 354, 0, 177, 375 )
[sub_resource type="AtlasTexture" id=25]
flags = 4
atlas = ExtResource( 4 )
region = Rect2( 531, 0, 177, 375 )
[sub_resource type="AtlasTexture" id=26]
flags = 4
atlas = ExtResource( 4 )
region = Rect2( 708, 0, 177, 375 )
[sub_resource type="AtlasTexture" id=27]
flags = 4
atlas = ExtResource( 4 )
region = Rect2( 885, 0, 177, 375 )
[sub_resource type="AtlasTexture" id=28]
flags = 4
atlas = ExtResource( 3 )
region = Rect2( 0, 0, 117, 375 )
[sub_resource type="SpriteFrames" id=14]
animations = [ {
"frames": [ SubResource( 15 ), SubResource( 16 ), SubResource( 17 ), SubResource( 18 ) ],
"loop": true,
"name": "disco",
"speed": 5.0
}, {
"frames": [ SubResource( 19 ), SubResource( 20 ) ],
"loop": true,
"name": "donkey",
"speed": 5.0
}, {
"frames": [ SubResource( 21 ) ],
"loop": true,
"name": "idle",
"speed": 5.0
}, {
"frames": [ SubResource( 22 ), SubResource( 23 ), SubResource( 24 ), SubResource( 25 ), SubResource( 26 ), SubResource( 27 ) ],
"loop": true,
"name": "pulp",
"speed": 5.0
}, {
"frames": [ SubResource( 28 ) ],
"loop": true,
"name": "speak",
"speed": 5.0
} ]
[node name="OierDancing" type="Area2D"]
pause_mode = 1
script = ExtResource( 1 )
global_id = "oier_dancing"
is_interactive = false
player_orients_on_arrival = false
combine_when_selected_action_is_in = [ ]
dialog_color = Color( 0.321569, 0.662745, 0.301961, 1 )
animations = null
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 1 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
frames = SubResource( 14 )
animation = "idle"
script = ExtResource( 6 )
[node name="Timer" type="Timer" parent="AnimatedSprite"]
wait_time = 6.0
[node name="dialog_position" type="Position2D" parent="."]
position = Vector2( -2, -273 )
[connection signal="timeout" from="AnimatedSprite/Timer" to="AnimatedSprite" method="_on_Timer_timeout"]

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 KiB

View File

@@ -1,13 +1,14 @@
[gd_scene load_steps=9 format=2] [gd_scene load_steps=10 format=2]
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_room.gd" type="Script" id=1] [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/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/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/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/rooms/turno_cocina/creditos/EnekoDancing.tscn" type="PackedScene" id=5]
[ext_resource path="res://gymkhana/logo-small.png" type="Texture" id=6] [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/SceneHandler.gd" type="Script" id=7]
[ext_resource path="res://gymkhana/rooms/turno_cocina/creditos/RestartGameButton.gd" type="Script" id=8] [ext_resource path="res://gymkhana/rooms/turno_cocina/creditos/RestartGameButton.gd" type="Script" id=8]
[ext_resource path="res://gymkhana/rooms/turno_cocina/creditos/OierDancing.tscn" type="PackedScene" id=9]
[node name="ESCRoom2" type="Node2D"] [node name="ESCRoom2" type="Node2D"]
script = ExtResource( 1 ) script = ExtResource( 1 )
@@ -28,14 +29,6 @@ margin_top = 764.0
margin_right = 933.0 margin_right = 933.0
margin_bottom = 1201.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="."] [node name="Button" type="Button" parent="."]
margin_left = 495.0 margin_left = 495.0
margin_top = 486.0 margin_top = 486.0
@@ -52,5 +45,11 @@ texture = ExtResource( 6 )
[node name="Node2D" type="Node2D" parent="."] [node name="Node2D" type="Node2D" parent="."]
script = ExtResource( 7 ) script = ExtResource( 7 )
[node name="OierDancing" parent="." instance=ExtResource( 9 )]
position = Vector2( 228, 376 )
[node name="EnekoDancing" parent="." instance=ExtResource( 5 )]
position = Vector2( 1109, 372 )
[connection signal="finished" from="scrollingText" to="Node2D" method="_on_scrollingText_finished"] [connection signal="finished" from="scrollingText" to="Node2D" method="_on_scrollingText_finished"]
[connection signal="button_up" from="Button" to="Node2D" method="_on_Button_button_up"] [connection signal="button_up" from="Button" to="Node2D" method="_on_Button_button_up"]

View File

@@ -1,23 +1,24 @@
:setup :setup
play_snd res://gymkhana/sounds/intro_menu_loop.ogg _music 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_global turno_cocina_creditos_return_to_menu_evisible false
set_interactive eneko_head false set_gui_visible false
transition fade_black out 2.0 accept_input NONE
play_video res://gymkhana/videos/turno_cocina/cuerno_epico.ogv
:ready :ready
set_gui_visible false set_gui_visible false
set_global game_over true set_global game_over true
transition fade_black in 2.0 set_global turno_cocina_credits_dancers_visible true
say oier_dancing "No se me ocurre nada que decir."
say oier_head "No se me ocurre nada que decir." say eneko_dancing "A mi tampoco."
say eneko_head "A mi tampoco." say eneko_dancing "Fumamos!?"
say eneko_head "Fumamos!?" say oier_dancing "Me pasas un filttro?"
say oier_head "Me pasas un filttro?" say eneko_dancing "..."
say eneko_head "..." say eneko_dancing "¡%&@@4!"
say eneko_head "¡%&@@4!" say oier_dancing "Ok"
say oier_head "Ok" say oier_dancing "Lanzamos los creditos?"
say oier_head "Lanzamos los creditos?" say eneko_dancing "Daleee!"
say eneko_head "Daleee!"
set_global turno_credits_rolling true set_global turno_credits_rolling true
set_global turno_cocina_credits_dancing true