transition_screen.tscn 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. [gd_scene load_steps=6 format=3 uid="uid://g4e2cyrofo76"]
  2. [ext_resource type="Script" uid="uid://c1ms1bgcsi83v" path="res://Scripts/transition_screen.gd" id="1"]
  3. [sub_resource type="Animation" id="Animation_203op"]
  4. length = 0.001
  5. tracks/0/type = "value"
  6. tracks/0/imported = false
  7. tracks/0/enabled = true
  8. tracks/0/path = NodePath("ColorRect:color")
  9. tracks/0/interp = 1
  10. tracks/0/loop_wrap = true
  11. tracks/0/keys = {
  12. "times": PackedFloat32Array(0),
  13. "transitions": PackedFloat32Array(1),
  14. "update": 0,
  15. "values": [Color(0, 0, 0, 1)]
  16. }
  17. [sub_resource type="Animation" id="Animation_w6gkv"]
  18. resource_name = "fade_from_black"
  19. tracks/0/type = "value"
  20. tracks/0/imported = false
  21. tracks/0/enabled = true
  22. tracks/0/path = NodePath("ColorRect:color")
  23. tracks/0/interp = 1
  24. tracks/0/loop_wrap = true
  25. tracks/0/keys = {
  26. "times": PackedFloat32Array(0, 1),
  27. "transitions": PackedFloat32Array(1, 1),
  28. "update": 0,
  29. "values": [Color(0, 0, 0, 1), Color(0, 0, 0, 0)]
  30. }
  31. [sub_resource type="Animation" id="Animation_8o11d"]
  32. resource_name = "fade_to_black"
  33. length = 0.5
  34. tracks/0/type = "value"
  35. tracks/0/imported = false
  36. tracks/0/enabled = true
  37. tracks/0/path = NodePath("ColorRect:color")
  38. tracks/0/interp = 1
  39. tracks/0/loop_wrap = true
  40. tracks/0/keys = {
  41. "times": PackedFloat32Array(0, 0.5),
  42. "transitions": PackedFloat32Array(1, 1),
  43. "update": 0,
  44. "values": [Color(0, 0, 0, 0), Color(0, 0, 0, 1)]
  45. }
  46. [sub_resource type="AnimationLibrary" id="AnimationLibrary_cgxjx"]
  47. _data = {
  48. &"RESET": SubResource("Animation_203op"),
  49. &"fade_from_black": SubResource("Animation_w6gkv"),
  50. &"fade_to_black": SubResource("Animation_8o11d")
  51. }
  52. [node name="TransitionScreen" type="CanvasLayer"]
  53. process_mode = 3
  54. script = ExtResource("1")
  55. [node name="ColorRect" type="ColorRect" parent="."]
  56. z_index = 1000
  57. anchors_preset = 15
  58. anchor_right = 1.0
  59. anchor_bottom = 1.0
  60. grow_horizontal = 2
  61. grow_vertical = 2
  62. mouse_filter = 2
  63. color = Color(0, 0, 0, 1)
  64. [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
  65. libraries = {
  66. "": SubResource("AnimationLibrary_cgxjx")
  67. }
  68. [connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_animation_player_animation_finished"]