GreenCheepCheep.tscn 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. [gd_scene load_steps=24 format=3 uid="uid://bdirphnfabey8"]
  2. [ext_resource type="Texture2D" uid="uid://dbq7oso3fo4n6" path="res://Assets/Sprites/Enemies/CheepCheep.png" id="1_123qd"]
  3. [ext_resource type="Script" uid="uid://b475vfhcp2f30" path="res://Scripts/Classes/Entities/Enemies/SwimmingCheepCheep.gd" id="1_a3qb1"]
  4. [ext_resource type="Script" uid="uid://caq1qiwmy0mox" path="res://Scripts/Parts/BetterAnimatedSprite.gd" id="3_1gkhc"]
  5. [ext_resource type="Script" uid="uid://chj8hu207lrh" path="res://Scripts/Classes/Components/EnemyPlayerDetection.gd" id="3_a5qfu"]
  6. [ext_resource type="Script" uid="uid://cbal8ms2oe1ik" path="res://Scripts/Classes/Components/ResourceSetterNew.gd" id="4_1gkhc"]
  7. [ext_resource type="Script" uid="uid://dri2d5jtu0fbq" path="res://Scripts/Classes/Components/FireballDetection.gd" id="4_cd02n"]
  8. [ext_resource type="JSON" path="res://Assets/Sprites/Enemies/GreenCheepCheep.json" id="5_8m1k0"]
  9. [ext_resource type="Script" uid="uid://c3gg32ivrlq8n" path="res://Scripts/Classes/Components/GibSpawner.gd" id="5_qwki7"]
  10. [ext_resource type="Script" uid="uid://5octqlf4ohel" path="res://Scripts/Classes/Components/ScoreNoteSpawner.gd" id="6_qwki7"]
  11. [ext_resource type="Script" uid="uid://d4a7yp6e55u8t" path="res://Scripts/Classes/Components/TrackJoint.gd" id="10_8m1k0"]
  12. [ext_resource type="Script" uid="uid://ctfbuoxtnnl0q" path="res://Scripts/Classes/Components/EditorPropertyExposer.gd" id="11_21r3x"]
  13. [ext_resource type="Script" uid="uid://b8vmbtoaaq5nc" path="res://Scripts/Parts/EditorToggleDetection.gd" id="12_si7cd"]
  14. [ext_resource type="Script" uid="uid://ba18grqjixded" path="res://Scripts/Classes/Components/ExplosionDetection.gd" id="13_m2mkg"]
  15. [sub_resource type="AtlasTexture" id="AtlasTexture_si7cd"]
  16. atlas = ExtResource("1_123qd")
  17. region = Rect2(0, 0, 16, 16)
  18. [sub_resource type="AtlasTexture" id="AtlasTexture_m2mkg"]
  19. atlas = ExtResource("1_123qd")
  20. region = Rect2(16, 0, 16, 16)
  21. [sub_resource type="SpriteFrames" id="SpriteFrames_pyihc"]
  22. animations = [{
  23. "frames": [{
  24. "duration": 1.0,
  25. "texture": SubResource("AtlasTexture_si7cd")
  26. }, {
  27. "duration": 1.0,
  28. "texture": SubResource("AtlasTexture_m2mkg")
  29. }],
  30. "loop": true,
  31. "name": &"default",
  32. "speed": 5.0
  33. }]
  34. [sub_resource type="RectangleShape2D" id="RectangleShape2D_cd02n"]
  35. size = Vector2(10, 10)
  36. [sub_resource type="Animation" id="Animation_a3qb1"]
  37. length = 0.001
  38. tracks/0/type = "value"
  39. tracks/0/imported = false
  40. tracks/0/enabled = true
  41. tracks/0/path = NodePath("Sprite:frame")
  42. tracks/0/interp = 1
  43. tracks/0/loop_wrap = true
  44. tracks/0/keys = {
  45. "times": PackedFloat32Array(0),
  46. "transitions": PackedFloat32Array(1),
  47. "update": 1,
  48. "values": [0]
  49. }
  50. [sub_resource type="Animation" id="Animation_iib8n"]
  51. resource_name = "Swim"
  52. length = 0.4
  53. loop_mode = 1
  54. step = 0.1
  55. tracks/0/type = "value"
  56. tracks/0/imported = false
  57. tracks/0/enabled = true
  58. tracks/0/path = NodePath("Sprite:frame")
  59. tracks/0/interp = 1
  60. tracks/0/loop_wrap = true
  61. tracks/0/keys = {
  62. "times": PackedFloat32Array(0, 0.2),
  63. "transitions": PackedFloat32Array(1, 1),
  64. "update": 1,
  65. "values": [0, 1]
  66. }
  67. [sub_resource type="AnimationLibrary" id="AnimationLibrary_a5qfu"]
  68. _data = {
  69. &"RESET": SubResource("Animation_a3qb1"),
  70. &"Swim": SubResource("Animation_iib8n")
  71. }
  72. [sub_resource type="Animation" id="Animation_b7un4"]
  73. length = 0.001
  74. tracks/0/type = "value"
  75. tracks/0/imported = false
  76. tracks/0/enabled = true
  77. tracks/0/path = NodePath("Sprite:position")
  78. tracks/0/interp = 1
  79. tracks/0/loop_wrap = true
  80. tracks/0/keys = {
  81. "times": PackedFloat32Array(0),
  82. "transitions": PackedFloat32Array(1),
  83. "update": 0,
  84. "values": [Vector2(0, -8)]
  85. }
  86. [sub_resource type="Animation" id="Animation_qwki7"]
  87. resource_name = "Wave"
  88. length = 2.0
  89. loop_mode = 2
  90. tracks/0/type = "value"
  91. tracks/0/imported = false
  92. tracks/0/enabled = true
  93. tracks/0/path = NodePath("Sprite:position")
  94. tracks/0/interp = 2
  95. tracks/0/loop_wrap = true
  96. tracks/0/keys = {
  97. "times": PackedFloat32Array(0, 1, 2),
  98. "transitions": PackedFloat32Array(1, 1, 1),
  99. "update": 0,
  100. "values": [Vector2(0, -16), Vector2(0, -8), Vector2(0, 0)]
  101. }
  102. [sub_resource type="AnimationLibrary" id="AnimationLibrary_reflr"]
  103. _data = {
  104. &"RESET": SubResource("Animation_b7un4"),
  105. &"Wave": SubResource("Animation_qwki7")
  106. }
  107. [node name="CheepCheep" type="CharacterBody2D" node_paths=PackedStringArray("on_screen_enabler", "score_note_adder") groups=["Enemies"]]
  108. script = ExtResource("1_a3qb1")
  109. on_screen_enabler = NodePath("Sprite/VisibleOnScreenEnabler2D")
  110. score_note_adder = NodePath("ScoreNoteSpawner")
  111. [node name="Sprite" type="AnimatedSprite2D" parent="."]
  112. position = Vector2(0, -8)
  113. scale = Vector2(-1, 1)
  114. sprite_frames = SubResource("SpriteFrames_pyihc")
  115. flip_h = true
  116. script = ExtResource("3_1gkhc")
  117. metadata/_custom_type_script = "uid://caq1qiwmy0mox"
  118. [node name="Hitbox" type="Area2D" parent="Sprite"]
  119. position = Vector2(0, 8)
  120. rotation = 3.14159
  121. scale = Vector2(1, -1)
  122. [node name="Collision" type="CollisionShape2D" parent="Sprite/Hitbox"]
  123. position = Vector2(0, -8)
  124. shape = SubResource("RectangleShape2D_cd02n")
  125. [node name="VisibleOnScreenEnabler2D" type="VisibleOnScreenEnabler2D" parent="Sprite"]
  126. rotation = 3.14159
  127. scale = Vector2(1, -1)
  128. enable_node_path = NodePath("../..")
  129. [node name="ResourceSetterNew" type="Node" parent="Sprite" node_paths=PackedStringArray("node_to_affect")]
  130. script = ExtResource("4_1gkhc")
  131. node_to_affect = NodePath("..")
  132. property_name = "sprite_frames"
  133. resource_json = ExtResource("5_8m1k0")
  134. metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
  135. [node name="Animations" type="AnimationPlayer" parent="."]
  136. libraries = {
  137. &"": SubResource("AnimationLibrary_a5qfu")
  138. }
  139. autoplay = "Swim"
  140. [node name="EnemyPlayerDetection" type="Node" parent="." node_paths=PackedStringArray("hitbox")]
  141. script = ExtResource("3_a5qfu")
  142. hitbox = NodePath("../Sprite/Hitbox")
  143. metadata/_custom_type_script = "uid://chj8hu207lrh"
  144. [node name="WaveAnimations" type="AnimationPlayer" parent="."]
  145. libraries = {
  146. &"": SubResource("AnimationLibrary_reflr")
  147. }
  148. [node name="FireballDetection" type="Node" parent="." node_paths=PackedStringArray("hitbox")]
  149. script = ExtResource("4_cd02n")
  150. hitbox = NodePath("../Sprite/Hitbox")
  151. metadata/_custom_type_script = "uid://dri2d5jtu0fbq"
  152. [node name="GibSpawner" type="Node" parent="." node_paths=PackedStringArray("visuals")]
  153. script = ExtResource("5_qwki7")
  154. visuals = NodePath("../Sprite")
  155. metadata/_custom_type_script = "uid://c3gg32ivrlq8n"
  156. [node name="ScoreNoteSpawner" type="Node" parent="."]
  157. script = ExtResource("6_qwki7")
  158. add_score = true
  159. metadata/_custom_type_script = "uid://5octqlf4ohel"
  160. [node name="TrackJoint" type="Node" parent="."]
  161. script = ExtResource("10_8m1k0")
  162. metadata/_custom_type_script = "uid://d4a7yp6e55u8t"
  163. [node name="PropertyExposer" type="Node" parent="."]
  164. script = ExtResource("11_21r3x")
  165. properties = Array[String](["movement_type"])
  166. metadata/_custom_type_script = "uid://ctfbuoxtnnl0q"
  167. [node name="LevelEditorToggleDetection" type="Node" parent="."]
  168. script = ExtResource("12_si7cd")
  169. metadata/_custom_type_script = "uid://b8vmbtoaaq5nc"
  170. [node name="ExplosionDetection" type="Node" parent="." node_paths=PackedStringArray("hitbox")]
  171. script = ExtResource("13_m2mkg")
  172. hitbox = NodePath("../Sprite/Hitbox")
  173. metadata/_custom_type_script = "uid://ba18grqjixded"
  174. [connection signal="killed" from="." to="GibSpawner" method="summon_gib"]
  175. [connection signal="invincible_player_hit" from="EnemyPlayerDetection" to="." method="die_from_object"]
  176. [connection signal="player_hit" from="EnemyPlayerDetection" to="." method="damage_player"]
  177. [connection signal="player_stomped_on" from="EnemyPlayerDetection" to="GibSpawner" method="stomp_die"]
  178. [connection signal="fireball_hit" from="FireballDetection" to="." method="die_from_object"]
  179. [connection signal="fireball_hit" from="FireballDetection" to="ScoreNoteSpawner" method="spawn_note" binds= [200]]
  180. [connection signal="toggled" from="LevelEditorToggleDetection" to="." method="_ready"]
  181. [connection signal="explosion_entered" from="ExplosionDetection" to="." method="die_from_object"]
  182. [connection signal="explosion_entered" from="ExplosionDetection" to="ScoreNoteSpawner" method="spawn_note" binds= [200]]