EndSmallCastle.tscn 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. [gd_scene load_steps=20 format=4 uid="uid://byqmn8yi7iuac"]
  2. [ext_resource type="Script" uid="uid://qq26qw7ltflb" path="res://Scripts/Parts/EndCastle.gd" id="1_4yifo"]
  3. [ext_resource type="Script" uid="uid://caq1qiwmy0mox" path="res://Scripts/Parts/BetterAnimatedSprite.gd" id="2_l3xjf"]
  4. [ext_resource type="Script" uid="uid://cbal8ms2oe1ik" path="res://Scripts/Classes/Components/ResourceSetterNew.gd" id="3_7xlhl"]
  5. [ext_resource type="Script" uid="uid://bdq0373j5n5o0" path="res://Scripts/Parts/CameraRightLimit.gd" id="4_1x3lf"]
  6. [ext_resource type="JSON" path="res://Assets/Sprites/Tilesets/CastleFlag.json" id="4_7xlhl"]
  7. [ext_resource type="PackedScene" uid="uid://qn4g0qkjcuiy" path="res://Scenes/Parts/SmallCastleVisual.tscn" id="5_an8pi"]
  8. [ext_resource type="Texture2D" uid="uid://dt0qtxu2l646n" path="res://Assets/Sprites/Tilesets/Terrain/Overworld.png" id="7_xg4af"]
  9. [ext_resource type="Script" uid="uid://73oviwf6bbys" path="res://Scripts/Classes/Components/TilesetTextureSetter.gd" id="8_l3xjf"]
  10. [ext_resource type="JSON" path="res://Assets/Sprites/Tilesets/Terrain/TerrainTiles.json" id="9_oyrq2"]
  11. [ext_resource type="Texture2D" uid="uid://dbacecqyfwr1m" path="res://Assets/Sprites/Tilesets/EndingCastleSprite.png" id="11_2hcdu"]
  12. [ext_resource type="JSON" path="res://Assets/Sprites/Tilesets/SmallCastle.json" id="12_xg4af"]
  13. [ext_resource type="Script" uid="uid://b8vmbtoaaq5nc" path="res://Scripts/Parts/EditorToggleDetection.gd" id="14_oyrq2"]
  14. [sub_resource type="SpriteFrames" id="SpriteFrames_7xlhl"]
  15. [sub_resource type="Animation" id="Animation_fyn5h"]
  16. length = 0.001
  17. tracks/0/type = "value"
  18. tracks/0/imported = false
  19. tracks/0/enabled = true
  20. tracks/0/path = NodePath("..:position")
  21. tracks/0/interp = 1
  22. tracks/0/loop_wrap = true
  23. tracks/0/keys = {
  24. "times": PackedFloat32Array(0),
  25. "transitions": PackedFloat32Array(1),
  26. "update": 0,
  27. "values": [Vector2(0, -56)]
  28. }
  29. [sub_resource type="Animation" id="Animation_7xlhl"]
  30. resource_name = "Raise"
  31. length = 0.5
  32. step = 0.0333333
  33. tracks/0/type = "value"
  34. tracks/0/imported = false
  35. tracks/0/enabled = true
  36. tracks/0/path = NodePath("..:position")
  37. tracks/0/interp = 2
  38. tracks/0/loop_wrap = true
  39. tracks/0/keys = {
  40. "times": PackedFloat32Array(0, 0.5),
  41. "transitions": PackedFloat32Array(1, 1),
  42. "update": 0,
  43. "values": [Vector2(0, -56), Vector2(0, -80)]
  44. }
  45. [sub_resource type="AnimationLibrary" id="AnimationLibrary_2hcdu"]
  46. _data = {
  47. &"RESET": SubResource("Animation_fyn5h"),
  48. &"Raise": SubResource("Animation_7xlhl")
  49. }
  50. [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_2hcdu"]
  51. texture = ExtResource("7_xg4af")
  52. texture_region_size = Vector2i(8, 8)
  53. 5:10/0 = 0
  54. 6:10/0 = 0
  55. 7:10/0 = 0
  56. 8:10/0 = 0
  57. 6:7/0 = 0
  58. 7:7/0 = 0
  59. 7:20/0 = 0
  60. 13:20/0 = 0
  61. 14:14/0 = 0
  62. 14:15/0 = 0
  63. 15:15/0 = 0
  64. 15:14/0 = 0
  65. 12:20/0 = 0
  66. 12:14/0 = 0
  67. 12:15/0 = 0
  68. 13:15/0 = 0
  69. 13:14/0 = 0
  70. 10:20/0 = 0
  71. 10:21/0 = 0
  72. 11:21/0 = 0
  73. 11:20/0 = 0
  74. [sub_resource type="TileSet" id="TileSet_xg4af"]
  75. tile_size = Vector2i(8, 8)
  76. sources/0 = SubResource("TileSetAtlasSource_2hcdu")
  77. [sub_resource type="RectangleShape2D" id="RectangleShape2D_4yifo"]
  78. size = Vector2(6, 20)
  79. [node name="EndSmallCastle" type="Node2D"]
  80. process_mode = 3
  81. script = ExtResource("1_4yifo")
  82. [node name="FlagJoint" type="Node2D" parent="."]
  83. z_index = -5
  84. position = Vector2(0, -56)
  85. [node name="Flag" type="AnimatedSprite2D" parent="FlagJoint"]
  86. show_behind_parent = true
  87. position = Vector2(0, -8)
  88. sprite_frames = SubResource("SpriteFrames_7xlhl")
  89. autoplay = "default"
  90. script = ExtResource("2_l3xjf")
  91. metadata/_custom_type_script = "uid://caq1qiwmy0mox"
  92. [node name="ResourceSetterNew" type="Node" parent="FlagJoint/Flag" node_paths=PackedStringArray("node_to_affect")]
  93. script = ExtResource("3_7xlhl")
  94. node_to_affect = NodePath("..")
  95. property_name = "sprite_frames"
  96. resource_json = ExtResource("4_7xlhl")
  97. metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
  98. [node name="AnimationPlayer" type="AnimationPlayer" parent="FlagJoint/Flag"]
  99. libraries = {
  100. &"": SubResource("AnimationLibrary_2hcdu")
  101. }
  102. [node name="CameraRightLimit" type="Node2D" parent="."]
  103. position = Vector2(128, 0)
  104. script = ExtResource("4_1x3lf")
  105. metadata/_custom_type_script = "uid://bdq0373j5n5o0"
  106. [node name="Framerule" type="Timer" parent="."]
  107. process_callback = 0
  108. wait_time = 0.351
  109. autostart = true
  110. [node name="SmallCastleVisual" parent="." instance=ExtResource("5_an8pi")]
  111. position = Vector2(0, -40)
  112. [node name="Overlay" type="TileMapLayer" parent="."]
  113. visible = false
  114. z_index = 10
  115. position = Vector2(-8, -32)
  116. tile_map_data = PackedByteArray("AAABAAAAAAANABQAAAACAAAAAAAOAA4AAAACAAEAAAAOAA8AAAADAAAAAAAPAA4AAAADAAEAAAAPAA8AAAACAAIAAAAOAA4AAAACAAMAAAAOAA8AAAADAAIAAAAPAA4AAAADAAMAAAAPAA8AAAAEAAAAAAAOAA4AAAAEAAEAAAAOAA8AAAAFAAAAAAAPAA4AAAAFAAEAAAAPAA8AAAAEAAIAAAAOAA4AAAAEAAMAAAAOAA8AAAAFAAIAAAAPAA4AAAAFAAMAAAAPAA8AAAAAAP7/AAAKABQAAAAAAP//AAAKABUAAAABAP7/AAALABQAAAABAP//AAALABUAAAACAP7/AAAKABQAAAACAP//AAAKABUAAAADAP7/AAALABQAAAADAP//AAALABUAAAAEAP7/AAAMAA4AAAAEAP//AAAMAA8AAAAFAP7/AAANAA4AAAAFAP//AAANAA8AAAA=")
  117. tile_set = SubResource("TileSet_xg4af")
  118. [node name="TilesetTextureSetter" type="Node" parent="Overlay" node_paths=PackedStringArray("tile_map")]
  119. script = ExtResource("8_l3xjf")
  120. tile_map = NodePath("..")
  121. metadata/_custom_type_script = "uid://73oviwf6bbys"
  122. [node name="ResourceSetter" type="Node" parent="Overlay/TilesetTextureSetter" node_paths=PackedStringArray("node_to_affect")]
  123. script = ExtResource("3_7xlhl")
  124. node_to_affect = NodePath("..")
  125. property_name = "texture"
  126. mode = 1
  127. resource_json = ExtResource("9_oyrq2")
  128. metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
  129. [node name="PlayerDetection" type="StaticBody2D" parent="Overlay"]
  130. position = Vector2(24, 32)
  131. collision_layer = 0
  132. collision_mask = 0
  133. [node name="CollisionShape2D" type="CollisionShape2D" parent="Overlay/PlayerDetection"]
  134. position = Vector2(21, -9)
  135. shape = SubResource("RectangleShape2D_4yifo")
  136. [node name="OverlaySprite" type="Sprite2D" parent="."]
  137. visible = false
  138. z_index = 10
  139. position = Vector2(0, -40)
  140. texture = ExtResource("11_2hcdu")
  141. hframes = 2
  142. frame = 1
  143. region_rect = Rect2(0, 80, 80, 80)
  144. [node name="ResourceSetterNew" type="Node" parent="OverlaySprite" node_paths=PackedStringArray("node_to_affect")]
  145. script = ExtResource("3_7xlhl")
  146. node_to_affect = NodePath("..")
  147. property_name = "texture"
  148. mode = 1
  149. resource_json = ExtResource("12_xg4af")
  150. metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
  151. [node name="LevelEditorToggleDetection" type="Node" parent="."]
  152. script = ExtResource("14_oyrq2")
  153. metadata/_custom_type_script = "uid://b8vmbtoaaq5nc"
  154. [connection signal="timeout" from="Framerule" to="." method="on_timeout"]