Hammer.tscn 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. [gd_scene load_steps=10 format=3 uid="uid://deo08vl26nc4b"]
  2. [ext_resource type="Script" uid="uid://s1utdly4mtbi" path="res://Scripts/Classes/Entities/Items/Hammer.gd" id="1_3ojke"]
  3. [ext_resource type="Texture2D" uid="uid://3xmhfi556p3s" path="res://Assets/Sprites/Items/Hammer.png" id="1_o34jf"]
  4. [ext_resource type="Script" uid="uid://cbal8ms2oe1ik" path="res://Scripts/Classes/Components/ResourceSetterNew.gd" id="3_k3c6x"]
  5. [ext_resource type="JSON" path="res://Assets/Sprites/Items/Hammer.json" id="4_pmlpp"]
  6. [sub_resource type="AtlasTexture" id="AtlasTexture_2tvg3"]
  7. atlas = ExtResource("1_o34jf")
  8. region = Rect2(0, 0, 16, 16)
  9. [sub_resource type="Animation" id="Animation_vmyq7"]
  10. length = 0.001
  11. tracks/0/type = "value"
  12. tracks/0/imported = false
  13. tracks/0/enabled = true
  14. tracks/0/path = NodePath("Sprite:rotation")
  15. tracks/0/interp = 1
  16. tracks/0/loop_wrap = true
  17. tracks/0/keys = {
  18. "times": PackedFloat32Array(0),
  19. "transitions": PackedFloat32Array(1),
  20. "update": 0,
  21. "values": [0.0]
  22. }
  23. [sub_resource type="Animation" id="Animation_3ojke"]
  24. resource_name = "Rotate"
  25. length = 0.4
  26. loop_mode = 1
  27. step = 0.1
  28. tracks/0/type = "value"
  29. tracks/0/imported = false
  30. tracks/0/enabled = true
  31. tracks/0/path = NodePath("Sprite:rotation")
  32. tracks/0/interp = 0
  33. tracks/0/loop_wrap = true
  34. tracks/0/keys = {
  35. "times": PackedFloat32Array(0, 0.1, 0.2, 0.3),
  36. "transitions": PackedFloat32Array(1, 1, 1, 1),
  37. "update": 0,
  38. "values": [0.0, -1.5708, -3.14159, -4.71239]
  39. }
  40. [sub_resource type="AnimationLibrary" id="AnimationLibrary_k3c6x"]
  41. _data = {
  42. &"RESET": SubResource("Animation_vmyq7"),
  43. &"Rotate": SubResource("Animation_3ojke")
  44. }
  45. [sub_resource type="CircleShape2D" id="CircleShape2D_pmlpp"]
  46. radius = 4.0
  47. [node name="Hammer" type="Node2D" groups=["Enemies"]]
  48. script = ExtResource("1_3ojke")
  49. [node name="Sprite" type="Sprite2D" parent="."]
  50. physics_interpolation_mode = 2
  51. texture = SubResource("AtlasTexture_2tvg3")
  52. [node name="ResourceSetterNew" type="Node" parent="Sprite" node_paths=PackedStringArray("node_to_affect", "property_node")]
  53. script = ExtResource("3_k3c6x")
  54. node_to_affect = NodePath("..")
  55. property_node = NodePath("../..")
  56. property_name = "texture"
  57. mode = 1
  58. resource_json = ExtResource("4_pmlpp")
  59. metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
  60. [node name="Animations" type="AnimationPlayer" parent="."]
  61. libraries = {
  62. &"": SubResource("AnimationLibrary_k3c6x")
  63. }
  64. autoplay = "Rotate"
  65. [node name="Hitbox" type="Area2D" parent="."]
  66. [node name="Shape" type="CollisionShape2D" parent="Hitbox"]
  67. shape = SubResource("CircleShape2D_pmlpp")
  68. [connection signal="area_entered" from="Hitbox" to="." method="on_area_entered"]