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

@@ -52,9 +52,9 @@ custom_data = {
}
}
action3_target_texts = {
"turno_cocina_cuchillo": "Amenzar",
"turno_cocina_frontal": "Ofrecer",
"turno_cocina_madera": "Ofrecerle leña",
"turno_cocina_cuchillo": "Amenzar"
"turno_cocina_madera": "Ofrecerle leña"
}
target_when_selected_action_is_in = [ "action3" ]
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
stop_snd
> [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
stop
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://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/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/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/OierDancing.tscn" type="PackedScene" id=9]
[node name="ESCRoom2" type="Node2D"]
script = ExtResource( 1 )
@@ -28,14 +29,6 @@ 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
@@ -52,5 +45,11 @@ texture = ExtResource( 6 )
[node name="Node2D" type="Node2D" parent="."]
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="button_up" from="Button" to="Node2D" method="_on_Button_button_up"]

View File

@@ -1,23 +1,24 @@
: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
set_gui_visible false
accept_input NONE
play_video res://gymkhana/videos/turno_cocina/cuerno_epico.ogv
: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_cocina_credits_dancers_visible true
say oier_dancing "No se me ocurre nada que decir."
say eneko_dancing "A mi tampoco."
say eneko_dancing "Fumamos!?"
say oier_dancing "Me pasas un filttro?"
say eneko_dancing "..."
say eneko_dancing "¡%&@@4!"
say oier_dancing "Ok"
say oier_dancing "Lanzamos los creditos?"
say eneko_dancing "Daleee!"
set_global turno_credits_rolling true
set_global turno_cocina_credits_dancing true