LeapingCheepCheep.tscn 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. [gd_scene load_steps=15 format=3 uid="uid://cwyxi1uihf35y"]
  2. [ext_resource type="Script" uid="uid://mshpvsyuw15j" path="res://Scripts/Classes/Entities/Enemies/LeapingCheepCheep.gd" id="1_pbhdk"]
  3. [ext_resource type="Texture2D" uid="uid://dbq7oso3fo4n6" path="res://Assets/Sprites/Enemies/CheepCheep.png" id="2_pbhdk"]
  4. [ext_resource type="Script" uid="uid://cbal8ms2oe1ik" path="res://Scripts/Classes/Components/ResourceSetterNew.gd" id="3_11skd"]
  5. [ext_resource type="JSON" path="res://Assets/Sprites/Enemies/RedCheepCheep.json" id="4_hwpvb"]
  6. [ext_resource type="Script" uid="uid://chj8hu207lrh" path="res://Scripts/Classes/Components/EnemyPlayerDetection.gd" id="4_w3x8m"]
  7. [ext_resource type="Script" uid="uid://c3gg32ivrlq8n" path="res://Scripts/Classes/Components/GibSpawner.gd" id="5_upc6k"]
  8. [ext_resource type="Script" uid="uid://dri2d5jtu0fbq" path="res://Scripts/Classes/Components/FireballDetection.gd" id="6_l756v"]
  9. [ext_resource type="Script" uid="uid://5octqlf4ohel" path="res://Scripts/Classes/Components/ScoreNoteSpawner.gd" id="6_upc6k"]
  10. [ext_resource type="Script" uid="uid://bbww34oiexbx2" path="res://Scripts/Classes/Components/ShellDetection.gd" id="7_813ad"]
  11. [ext_resource type="Script" uid="uid://ba18grqjixded" path="res://Scripts/Classes/Components/ExplosionDetection.gd" id="10_hwpvb"]
  12. [sub_resource type="AtlasTexture" id="AtlasTexture_ojki6"]
  13. atlas = ExtResource("2_pbhdk")
  14. region = Rect2(0, 16, 16, 16)
  15. [sub_resource type="AtlasTexture" id="AtlasTexture_w3x8m"]
  16. atlas = ExtResource("2_pbhdk")
  17. region = Rect2(16, 16, 16, 16)
  18. [sub_resource type="SpriteFrames" id="SpriteFrames_upc6k"]
  19. animations = [{
  20. "frames": [{
  21. "duration": 1.0,
  22. "texture": SubResource("AtlasTexture_ojki6")
  23. }, {
  24. "duration": 1.0,
  25. "texture": SubResource("AtlasTexture_w3x8m")
  26. }],
  27. "loop": true,
  28. "name": &"default",
  29. "speed": 5.0
  30. }]
  31. [sub_resource type="RectangleShape2D" id="RectangleShape2D_ojki6"]
  32. size = Vector2(12, 12)
  33. [node name="LeapingCheepCheep" type="CharacterBody2D" node_paths=PackedStringArray("on_screen_enabler", "score_note_adder") groups=["Enemies"]]
  34. script = ExtResource("1_pbhdk")
  35. on_screen_enabler = NodePath("VisibleOnScreenNotifier2D")
  36. score_note_adder = NodePath("ScoreNoteSpawner")
  37. metadata/_custom_type_script = "uid://bpydbpyjk1mt4"
  38. [node name="Sprite" type="AnimatedSprite2D" parent="."]
  39. position = Vector2(0, -8)
  40. scale = Vector2(-1, 1)
  41. sprite_frames = SubResource("SpriteFrames_upc6k")
  42. autoplay = "default"
  43. frame_progress = 0.0672909
  44. flip_h = true
  45. [node name="ResourceSetterNew" type="Node" parent="Sprite" node_paths=PackedStringArray("node_to_affect")]
  46. script = ExtResource("3_11skd")
  47. node_to_affect = NodePath("..")
  48. property_name = "sprite_frames"
  49. resource_json = ExtResource("4_hwpvb")
  50. metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
  51. [node name="Hitbox" type="Area2D" parent="."]
  52. [node name="Shape" type="CollisionShape2D" parent="Hitbox"]
  53. position = Vector2(0, -6)
  54. shape = SubResource("RectangleShape2D_ojki6")
  55. [node name="EnemyPlayerDetection" type="Node" parent="." node_paths=PackedStringArray("hitbox")]
  56. script = ExtResource("4_w3x8m")
  57. hitbox = NodePath("../Hitbox")
  58. metadata/_custom_type_script = "uid://chj8hu207lrh"
  59. [node name="GibSpawner" type="Node" parent="." node_paths=PackedStringArray("visuals")]
  60. script = ExtResource("5_upc6k")
  61. visuals = NodePath("../Sprite")
  62. metadata/_custom_type_script = "uid://c3gg32ivrlq8n"
  63. [node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."]
  64. position = Vector2(0, -8)
  65. [node name="ScoreNoteSpawner" type="Node" parent="."]
  66. script = ExtResource("6_upc6k")
  67. add_score = true
  68. metadata/_custom_type_script = "uid://5octqlf4ohel"
  69. [node name="FireballDetection" type="Node" parent="." node_paths=PackedStringArray("hitbox")]
  70. script = ExtResource("6_l756v")
  71. hitbox = NodePath("../Hitbox")
  72. metadata/_custom_type_script = "uid://dri2d5jtu0fbq"
  73. [node name="ShellDetection" type="Node" parent="." node_paths=PackedStringArray("hitbox")]
  74. script = ExtResource("7_813ad")
  75. hitbox = NodePath("../Hitbox")
  76. metadata/_custom_type_script = "uid://bbww34oiexbx2"
  77. [node name="Line2D" type="Line2D" parent="."]
  78. visible = false
  79. top_level = true
  80. visibility_layer = 2
  81. texture_repeat = 2
  82. width = 1.0
  83. texture_mode = 1
  84. [node name="ExplosionDetection" type="Node" parent="." node_paths=PackedStringArray("hitbox")]
  85. script = ExtResource("10_hwpvb")
  86. hitbox = NodePath("../Hitbox")
  87. metadata/_custom_type_script = "uid://ba18grqjixded"
  88. [connection signal="killed" from="." to="GibSpawner" method="summon_gib"]
  89. [connection signal="invincible_player_hit" from="EnemyPlayerDetection" to="." method="die_from_object"]
  90. [connection signal="player_hit" from="EnemyPlayerDetection" to="." method="damage_player"]
  91. [connection signal="player_stomped_on" from="EnemyPlayerDetection" to="GibSpawner" method="stomp_die"]
  92. [connection signal="screen_exited" from="VisibleOnScreenNotifier2D" to="." method="queue_free"]
  93. [connection signal="fireball_hit" from="FireballDetection" to="." method="die_from_object"]
  94. [connection signal="fireball_hit" from="FireballDetection" to="ScoreNoteSpawner" method="spawn_note" binds= [200]]
  95. [connection signal="moving_shell_entered" from="ShellDetection" to="." method="die_from_object"]
  96. [connection signal="explosion_entered" from="ExplosionDetection" to="." method="die_from_object"]
  97. [connection signal="explosion_entered" from="ExplosionDetection" to="ScoreNoteSpawner" method="spawn_note" binds= [200]]