SpinningCoin.tscn 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. [gd_scene load_steps=11 format=3 uid="uid://clxssds8sj8pf"]
  2. [ext_resource type="Script" uid="uid://dixhffcqfnyku" path="res://Scripts/Classes/Entities/Items/SpinningCoin.gd" id="1_pvx50"]
  3. [ext_resource type="Texture2D" uid="uid://bnomivkphlt60" path="res://Assets/Sprites/Items/SpinningCoin.png" id="2_6slgd"]
  4. [ext_resource type="Script" uid="uid://5octqlf4ohel" path="res://Scripts/Classes/Components/ScoreNoteSpawner.gd" id="3_6slgd"]
  5. [ext_resource type="Script" uid="uid://cbal8ms2oe1ik" path="res://Scripts/Classes/Components/ResourceSetterNew.gd" id="3_7mdmn"]
  6. [ext_resource type="JSON" path="res://Assets/Sprites/Items/SpinningCoin.json" id="4_b5lmc"]
  7. [sub_resource type="AtlasTexture" id="AtlasTexture_v0qq2"]
  8. atlas = ExtResource("2_6slgd")
  9. region = Rect2(0, 0, 16, 16)
  10. [sub_resource type="AtlasTexture" id="AtlasTexture_7mdmn"]
  11. atlas = ExtResource("2_6slgd")
  12. region = Rect2(16, 0, 16, 16)
  13. [sub_resource type="AtlasTexture" id="AtlasTexture_b5lmc"]
  14. atlas = ExtResource("2_6slgd")
  15. region = Rect2(32, 0, 16, 16)
  16. [sub_resource type="AtlasTexture" id="AtlasTexture_mqre6"]
  17. atlas = ExtResource("2_6slgd")
  18. region = Rect2(48, 0, 16, 16)
  19. [sub_resource type="SpriteFrames" id="SpriteFrames_sax2u"]
  20. animations = [{
  21. "frames": [{
  22. "duration": 1.0,
  23. "texture": SubResource("AtlasTexture_v0qq2")
  24. }, {
  25. "duration": 1.0,
  26. "texture": SubResource("AtlasTexture_7mdmn")
  27. }, {
  28. "duration": 1.0,
  29. "texture": SubResource("AtlasTexture_b5lmc")
  30. }, {
  31. "duration": 1.0,
  32. "texture": SubResource("AtlasTexture_mqre6")
  33. }],
  34. "loop": true,
  35. "name": &"default",
  36. "speed": 20.0
  37. }]
  38. [node name="SpinningCoin" type="Node2D"]
  39. script = ExtResource("1_pvx50")
  40. metadata/block_spawn_offset = Vector2(0, -4)
  41. [node name="Sprite" type="AnimatedSprite2D" parent="."]
  42. sprite_frames = SubResource("SpriteFrames_sax2u")
  43. autoplay = "default"
  44. frame_progress = 0.710764
  45. [node name="ResourceSetterNew" type="Node" parent="Sprite" node_paths=PackedStringArray("node_to_affect")]
  46. script = ExtResource("3_7mdmn")
  47. node_to_affect = NodePath("..")
  48. property_name = "sprite_frames"
  49. resource_json = ExtResource("4_b5lmc")
  50. metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
  51. [node name="Timer" type="Timer" parent="."]
  52. wait_time = 0.5
  53. one_shot = true
  54. autostart = true
  55. [node name="ScoreNoteSpawner" type="Node" parent="."]
  56. script = ExtResource("3_6slgd")
  57. metadata/_custom_type_script = "uid://5octqlf4ohel"
  58. [connection signal="timeout" from="Timer" to="." method="vanish"]
  59. [connection signal="timeout" from="Timer" to="ScoreNoteSpawner" method="spawn_note" binds= [0, 200]]