EndFlagpole.tscn 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. [gd_scene load_steps=24 format=3 uid="uid://c6loucilra6da"]
  2. [ext_resource type="Script" uid="uid://dwfnvpioh2kvi" path="res://Scripts/Parts/EndFlagpole.gd" id="1_3rtm4"]
  3. [ext_resource type="Texture2D" uid="uid://3vg41a5plc4e" path="res://Assets/Sprites/Tilesets/FlagPole.png" id="1_hnd65"]
  4. [ext_resource type="Script" uid="uid://cnheej0sxmoxg" path="res://Scripts/Parts/PlayerDetection.gd" id="4_62gix"]
  5. [ext_resource type="JSON" path="res://Assets/Sprites/Tilesets/FlagPole.json" id="4_nykv5"]
  6. [ext_resource type="Script" uid="uid://5octqlf4ohel" path="res://Scripts/Classes/Components/ScoreNoteSpawner.gd" id="5_dm4yn"]
  7. [ext_resource type="Script" uid="uid://cmvlgsjmsk0v5" path="res://Scripts/Classes/Resources/ThemedResource.gd" id="5_jihtx"]
  8. [ext_resource type="Script" uid="uid://cbal8ms2oe1ik" path="res://Scripts/Classes/Components/ResourceSetterNew.gd" id="5_sjcdg"]
  9. [ext_resource type="JSON" path="res://Assets/Sprites/Tilesets/Flag.json" id="6_tpsyw"]
  10. [ext_resource type="FontVariation" uid="uid://cflgloiossd8a" path="res://Resources/ThemedResources/ScoreFont.tres" id="8_sjcdg"]
  11. [ext_resource type="Script" uid="uid://dt2p68xl462v2" path="res://Scripts/Parts/TextShadowColourChanger.gd" id="9_jihtx"]
  12. [ext_resource type="Script" uid="uid://cqif1li7otvpl" path="res://Scripts/Parts/SpriteFramesToJsonConverter.gd" id="12_jgs31"]
  13. [sub_resource type="AtlasTexture" id="AtlasTexture_uwkl1"]
  14. atlas = ExtResource("1_hnd65")
  15. region = Rect2(0, 0, 16, 176)
  16. [sub_resource type="SpriteFrames" id="SpriteFrames_tpsyw"]
  17. [sub_resource type="SegmentShape2D" id="SegmentShape2D_hnd65"]
  18. b = Vector2(0, -152)
  19. [sub_resource type="Animation" id="Animation_3rtm4"]
  20. resource_name = "FlagDown"
  21. tracks/0/type = "value"
  22. tracks/0/imported = false
  23. tracks/0/enabled = true
  24. tracks/0/path = NodePath("Flag:position")
  25. tracks/0/interp = 1
  26. tracks/0/loop_wrap = true
  27. tracks/0/keys = {
  28. "times": PackedFloat32Array(0, 1),
  29. "transitions": PackedFloat32Array(1, 1),
  30. "update": 0,
  31. "values": [Vector2(-8, -152), Vector2(-8, -32)]
  32. }
  33. [sub_resource type="Animation" id="Animation_xwflf"]
  34. length = 0.001
  35. tracks/0/type = "value"
  36. tracks/0/imported = false
  37. tracks/0/enabled = true
  38. tracks/0/path = NodePath("Flag:position")
  39. tracks/0/interp = 1
  40. tracks/0/loop_wrap = true
  41. tracks/0/keys = {
  42. "times": PackedFloat32Array(0),
  43. "transitions": PackedFloat32Array(1),
  44. "update": 0,
  45. "values": [Vector2(-8, -152)]
  46. }
  47. [sub_resource type="AnimationLibrary" id="AnimationLibrary_62gix"]
  48. _data = {
  49. &"FlagDown": SubResource("Animation_3rtm4"),
  50. &"RESET": SubResource("Animation_xwflf")
  51. }
  52. [sub_resource type="CircleShape2D" id="CircleShape2D_c56yc"]
  53. radius = 4.0
  54. [sub_resource type="Animation" id="Animation_uwkl1"]
  55. length = 0.001
  56. tracks/0/type = "value"
  57. tracks/0/imported = false
  58. tracks/0/enabled = true
  59. tracks/0/path = NodePath("Score:position")
  60. tracks/0/interp = 1
  61. tracks/0/loop_wrap = true
  62. tracks/0/keys = {
  63. "times": PackedFloat32Array(0),
  64. "transitions": PackedFloat32Array(1),
  65. "update": 0,
  66. "values": [Vector2(8, -24)]
  67. }
  68. tracks/1/type = "value"
  69. tracks/1/imported = false
  70. tracks/1/enabled = true
  71. tracks/1/path = NodePath("Score:visible")
  72. tracks/1/interp = 1
  73. tracks/1/loop_wrap = true
  74. tracks/1/keys = {
  75. "times": PackedFloat32Array(0),
  76. "transitions": PackedFloat32Array(1),
  77. "update": 1,
  78. "values": [false]
  79. }
  80. [sub_resource type="Animation" id="Animation_c56yc"]
  81. resource_name = "ScoreRise"
  82. tracks/0/type = "value"
  83. tracks/0/imported = false
  84. tracks/0/enabled = true
  85. tracks/0/path = NodePath("Score:position")
  86. tracks/0/interp = 1
  87. tracks/0/loop_wrap = true
  88. tracks/0/keys = {
  89. "times": PackedFloat32Array(0, 1),
  90. "transitions": PackedFloat32Array(1, 1),
  91. "update": 0,
  92. "values": [Vector2(8, -24), Vector2(8, -168)]
  93. }
  94. tracks/1/type = "value"
  95. tracks/1/imported = false
  96. tracks/1/enabled = true
  97. tracks/1/path = NodePath("Score:visible")
  98. tracks/1/interp = 1
  99. tracks/1/loop_wrap = true
  100. tracks/1/keys = {
  101. "times": PackedFloat32Array(0),
  102. "transitions": PackedFloat32Array(1),
  103. "update": 1,
  104. "values": [true]
  105. }
  106. [sub_resource type="AnimationLibrary" id="AnimationLibrary_jihtx"]
  107. _data = {
  108. &"RESET": SubResource("Animation_uwkl1"),
  109. &"ScoreRise": SubResource("Animation_c56yc")
  110. }
  111. [sub_resource type="AtlasTexture" id="AtlasTexture_jihtx"]
  112. atlas = ExtResource("1_hnd65")
  113. region = Rect2(16, 0, 16, 176)
  114. [sub_resource type="Resource" id="Resource_a0hgu"]
  115. script = ExtResource("5_jihtx")
  116. Overworld = SubResource("AtlasTexture_uwkl1")
  117. Snow = SubResource("AtlasTexture_jihtx")
  118. metadata/_custom_type_script = ExtResource("5_jihtx")
  119. [node name="EndFlagpole" type="Node2D" groups=["Flagpole"]]
  120. z_index = -5
  121. script = ExtResource("1_3rtm4")
  122. [node name="Pole" type="Sprite2D" parent="."]
  123. position = Vector2(0, -88)
  124. texture = SubResource("AtlasTexture_uwkl1")
  125. [node name="ResourceSetterNew" type="Node" parent="Pole" node_paths=PackedStringArray("node_to_affect")]
  126. script = ExtResource("5_sjcdg")
  127. node_to_affect = NodePath("..")
  128. property_name = "texture"
  129. mode = 1
  130. resource_json = ExtResource("4_nykv5")
  131. metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
  132. [node name="Flag" type="AnimatedSprite2D" parent="."]
  133. position = Vector2(-8, -152)
  134. sprite_frames = SubResource("SpriteFrames_tpsyw")
  135. autoplay = "default"
  136. offset = Vector2(-1, 0)
  137. [node name="ResourceSetterNew" type="Node" parent="Flag" node_paths=PackedStringArray("node_to_affect")]
  138. script = ExtResource("5_sjcdg")
  139. node_to_affect = NodePath("..")
  140. property_name = "sprite_frames"
  141. resource_json = ExtResource("6_tpsyw")
  142. metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
  143. [node name="Hitbox" type="Area2D" parent="."]
  144. [node name="Shape" type="CollisionShape2D" parent="Hitbox"]
  145. position = Vector2(0, -16)
  146. shape = SubResource("SegmentShape2D_hnd65")
  147. [node name="Animation" type="AnimationPlayer" parent="."]
  148. libraries = {
  149. &"": SubResource("AnimationLibrary_62gix")
  150. }
  151. [node name="Top" type="Area2D" parent="."]
  152. script = ExtResource("4_62gix")
  153. metadata/_custom_type_script = "uid://cnheej0sxmoxg"
  154. [node name="CollisionShape2D" type="CollisionShape2D" parent="Top"]
  155. position = Vector2(0, -164)
  156. shape = SubResource("CircleShape2D_c56yc")
  157. [node name="ScoreNoteSpawner" type="Node" parent="."]
  158. script = ExtResource("5_dm4yn")
  159. note_offset = Vector2(0, -160)
  160. metadata/_custom_type_script = "uid://5octqlf4ohel"
  161. [node name="Score" type="Label" parent="."]
  162. visible = false
  163. visibility_layer = 2
  164. offset_left = 8.0
  165. offset_top = -24.0
  166. offset_right = 48.0
  167. offset_bottom = -8.0
  168. theme_override_fonts/font = ExtResource("8_sjcdg")
  169. text = "5000"
  170. [node name="Animation2" type="AnimationPlayer" parent="Score"]
  171. root_node = NodePath("../..")
  172. libraries = {
  173. &"": SubResource("AnimationLibrary_jihtx")
  174. }
  175. [node name="TextShadowColourChanger" type="Node" parent="Score" node_paths=PackedStringArray("labels")]
  176. script = ExtResource("9_jihtx")
  177. labels = [NodePath("..")]
  178. metadata/_custom_type_script = "uid://dt2p68xl462v2"
  179. [node name="ThemedToJSONConverter" type="Node" parent="."]
  180. script = ExtResource("12_jgs31")
  181. resource = SubResource("Resource_a0hgu")
  182. json_file_path = "res://Assets/Sprites/Tilesets/FlagPole.json"
  183. metadata/_custom_type_script = "uid://cqif1li7otvpl"
  184. [connection signal="area_entered" from="Hitbox" to="." method="on_area_entered"]
  185. [connection signal="player_entered" from="Top" to="." method="on_player_entered"]
  186. [connection signal="player_entered" from="Top" to="ScoreNoteSpawner" method="spawn_one_up_note" unbinds=1]