diff --git a/scenes/nabo.tscn b/scenes/nabo.tscn index acd1cc9..3eec2c6 100644 --- a/scenes/nabo.tscn +++ b/scenes/nabo.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=41 format=3 uid="uid://cg154e3cwcjlr"] +[gd_scene load_steps=42 format=3 uid="uid://cg154e3cwcjlr"] [ext_resource type="Texture2D" uid="uid://2cryhpbyyx5l" path="res://sprites/gusanodeprevado-Sheet.png" id="1_ojo15"] [ext_resource type="Script" path="res://scripts/nabo.gd" id="1_xx4vo"] @@ -7,6 +7,7 @@ [ext_resource type="Texture2D" uid="uid://o7krashpq30x" path="res://sprites/nabo_pequeno_como_el_de_tato-Sheet.png" id="4_wi1s4"] [ext_resource type="Texture2D" uid="uid://4bgodo4d3j2s" path="res://sprites/globo.png" id="6_fqje7"] [ext_resource type="FontFile" uid="uid://cj2ccsjuqok0k" path="res://fonts/manaspc.ttf" id="7_8dw07"] +[ext_resource type="Texture2D" uid="uid://dprknn6ey610d" path="res://sprites/presionae-Sheet.png" id="8_ca0t2"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_j253i"] size = Vector2(108, 69) @@ -588,6 +589,15 @@ one_shot = true [node name="AnimationTime" type="Timer" parent="."] wait_time = 0.1 +[node name="KeyTime" type="Timer" parent="."] +wait_time = 0.4 +one_shot = true + +[node name="Sprite2D" type="Sprite2D" parent="."] +position = Vector2(145, -36) +texture = ExtResource("8_ca0t2") +hframes = 2 + [connection signal="area_entered" from="." to="." method="_on_area_entered"] [connection signal="body_entered" from="." to="." method="_on_body_entered"] [connection signal="body_exited" from="." to="." method="_on_body_exited"] diff --git a/scenes/win_animation.tscn b/scenes/win_animation.tscn index 02bc1b3..429c48d 100644 --- a/scenes/win_animation.tscn +++ b/scenes/win_animation.tscn @@ -81,9 +81,12 @@ max_distance = 1e+09 bus = &"Music" [node name="Sprite2D" type="Sprite2D" parent="."] -visible = false position = Vector2(-2, -28) texture = ExtResource("7_j1p8o") hframes = 23 -[connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_animation_player_animation_finished"] +[node name="WinTimer" type="Timer" parent="."] +wait_time = 5.25 +one_shot = true + +[connection signal="timeout" from="WinTimer" to="." method="_on_win_timer_timeout"] diff --git a/scripts/nabo.gd b/scripts/nabo.gd index 47ba9c0..47914a6 100644 --- a/scripts/nabo.gd +++ b/scripts/nabo.gd @@ -21,27 +21,34 @@ func _process(delta: float) -> void: if $TalkingTime.is_stopped(): Sounds.stopnabovoice() if textnumber == 2: + $Sprite2D.visible = true $AnimatedSprite2D.animation = "eyesmall" if Input.is_action_just_pressed("NEXT"): + $Sprite2D.frame = 1 Sounds.newdialogue() $AnimatedSprite2D.animation = "talksmall" $AnimationPlayer2.play("text2") $TalkingTime.start() if textnumber == 3: + $Sprite2D.frame = 0 $AnimatedSprite2D.animation = "eyesmall" if Input.is_action_just_pressed("NEXT"): + $Sprite2D.frame = 1 Sounds.newdialogue() $AnimatedSprite2D.animation = "talksmall" $AnimationPlayer2.play("text3") $TalkingTime.start() if textnumber == 4: + $Sprite2D.frame = 0 $AnimatedSprite2D.animation = "eyesmall" if mousePointing: + $Sprite2D.frame = 1 Sounds.newdialogue() $AnimatedSprite2D.animation = "talkbig" $AnimationPlayer2.play("text4") $TalkingTime.start() if textnumber == 5: + $Sprite2D.visible = false $AnimatedSprite2D.animation = "eyebig" if Input.is_action_just_pressed("NEXT"): Sounds.newdialogue() diff --git a/sprites/presionae-Sheet.png b/sprites/presionae-Sheet.png new file mode 100644 index 0000000..d06da91 Binary files /dev/null and b/sprites/presionae-Sheet.png differ diff --git a/sprites/presionae-Sheet.png.import b/sprites/presionae-Sheet.png.import new file mode 100644 index 0000000..67fa5ba --- /dev/null +++ b/sprites/presionae-Sheet.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dprknn6ey610d" +path="res://.godot/imported/presionae-Sheet.png-9665801af59495c1d8600e3b616c521d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/presionae-Sheet.png" +dest_files=["res://.godot/imported/presionae-Sheet.png-9665801af59495c1d8600e3b616c521d.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1