SpinningRedCoin.tscn 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. [gd_scene load_steps=16 format=3 uid="uid://d3gnwmvds4ors"]
  2. [ext_resource type="Script" uid="uid://bmi5fmguqbdyh" path="res://Scripts/Classes/Entities/Items/SpinningRedCoin.gd" id="1_2dih8"]
  3. [ext_resource type="Texture2D" uid="uid://c8wpxm7b5tgiq" path="res://Assets/Sprites/Items/RedCoin.png" id="2_1ws6h"]
  4. [ext_resource type="Script" uid="uid://cbal8ms2oe1ik" path="res://Scripts/Classes/Components/ResourceSetterNew.gd" id="3_ke76m"]
  5. [ext_resource type="Script" uid="uid://5octqlf4ohel" path="res://Scripts/Classes/Components/ScoreNoteSpawner.gd" id="3_oosg8"]
  6. [ext_resource type="Script" uid="uid://caq1qiwmy0mox" path="res://Scripts/Parts/BetterAnimatedSprite.gd" id="3_rnpac"]
  7. [ext_resource type="JSON" path="res://Assets/Sprites/Items/RedCoin.json" id="4_rnpac"]
  8. [sub_resource type="AtlasTexture" id="AtlasTexture_lwdcj"]
  9. atlas = ExtResource("2_1ws6h")
  10. region = Rect2(0, 16, 16, 16)
  11. [sub_resource type="AtlasTexture" id="AtlasTexture_onh0k"]
  12. atlas = ExtResource("2_1ws6h")
  13. region = Rect2(16, 16, 16, 16)
  14. [sub_resource type="AtlasTexture" id="AtlasTexture_1w0wa"]
  15. atlas = ExtResource("2_1ws6h")
  16. region = Rect2(32, 16, 16, 16)
  17. [sub_resource type="AtlasTexture" id="AtlasTexture_4qu2r"]
  18. atlas = ExtResource("2_1ws6h")
  19. region = Rect2(48, 16, 16, 16)
  20. [sub_resource type="AtlasTexture" id="AtlasTexture_0xloa"]
  21. atlas = ExtResource("2_1ws6h")
  22. region = Rect2(0, 0, 16, 16)
  23. [sub_resource type="AtlasTexture" id="AtlasTexture_0r8d3"]
  24. atlas = ExtResource("2_1ws6h")
  25. region = Rect2(16, 0, 16, 16)
  26. [sub_resource type="AtlasTexture" id="AtlasTexture_0fjrw"]
  27. atlas = ExtResource("2_1ws6h")
  28. region = Rect2(32, 0, 16, 16)
  29. [sub_resource type="AtlasTexture" id="AtlasTexture_ppl3b"]
  30. atlas = ExtResource("2_1ws6h")
  31. region = Rect2(48, 0, 16, 16)
  32. [sub_resource type="SpriteFrames" id="SpriteFrames_oosg8"]
  33. animations = [{
  34. "frames": [{
  35. "duration": 1.0,
  36. "texture": SubResource("AtlasTexture_lwdcj")
  37. }, {
  38. "duration": 1.0,
  39. "texture": SubResource("AtlasTexture_onh0k")
  40. }, {
  41. "duration": 1.0,
  42. "texture": SubResource("AtlasTexture_1w0wa")
  43. }, {
  44. "duration": 1.0,
  45. "texture": SubResource("AtlasTexture_4qu2r")
  46. }],
  47. "loop": true,
  48. "name": &"Collected",
  49. "speed": 8.0
  50. }, {
  51. "frames": [{
  52. "duration": 1.0,
  53. "texture": SubResource("AtlasTexture_0xloa")
  54. }, {
  55. "duration": 1.0,
  56. "texture": SubResource("AtlasTexture_0r8d3")
  57. }, {
  58. "duration": 1.0,
  59. "texture": SubResource("AtlasTexture_0fjrw")
  60. }, {
  61. "duration": 1.0,
  62. "texture": SubResource("AtlasTexture_ppl3b")
  63. }],
  64. "loop": true,
  65. "name": &"Idle",
  66. "speed": 8.0
  67. }]
  68. [node name="SpinningCoin" type="Node2D"]
  69. visibility_layer = 3
  70. script = ExtResource("1_2dih8")
  71. [node name="Sprite" type="AnimatedSprite2D" parent="."]
  72. position = Vector2(0, -8)
  73. sprite_frames = SubResource("SpriteFrames_oosg8")
  74. animation = &"Idle"
  75. autoplay = "Idle"
  76. frame_progress = 0.49333584
  77. speed_scale = 2.5
  78. script = ExtResource("3_rnpac")
  79. metadata/_custom_type_script = "uid://caq1qiwmy0mox"
  80. [node name="ResourceSetterNew" type="Node" parent="Sprite" node_paths=PackedStringArray("node_to_affect")]
  81. script = ExtResource("3_ke76m")
  82. node_to_affect = NodePath("..")
  83. property_name = "sprite_frames"
  84. resource_json = ExtResource("4_rnpac")
  85. metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
  86. [node name="Timer" type="Timer" parent="."]
  87. wait_time = 0.5
  88. one_shot = true
  89. autostart = true
  90. [node name="ScoreNoteSpawner" type="Node" parent="."]
  91. script = ExtResource("3_oosg8")
  92. metadata/_custom_type_script = "uid://5octqlf4ohel"
  93. [connection signal="timeout" from="Timer" to="." method="vanish"]
  94. [connection signal="timeout" from="Timer" to="ScoreNoteSpawner" method="spawn_note" binds= [0, 200]]