button.tscn 797 B

12345678910111213141516171819202122
  1. [gd_scene load_steps=4 format=3 uid="uid://hhi4klksmnov"]
  2. [ext_resource type="Script" path="res://button/button.gd" id="1_4bo1c"]
  3. [ext_resource type="Texture2D" uid="uid://dv08u4k42e12f" path="res://icon.svg" id="1_h2lk7"]
  4. [sub_resource type="RectangleShape2D" id="RectangleShape2D_nfq76"]
  5. size = Vector2(64, 64)
  6. [node name="button" type="Area2D" groups=["buttons"]]
  7. collision_mask = 7
  8. script = ExtResource("1_4bo1c")
  9. [node name="Sprite2D" type="Sprite2D" parent="."]
  10. scale = Vector2(0.5, 0.5)
  11. texture = ExtResource("1_h2lk7")
  12. [node name="CollisionShape2D" type="CollisionShape2D" parent="."]
  13. shape = SubResource("RectangleShape2D_nfq76")
  14. [connection signal="body_entered" from="." to="." method="_on_body_entered"]
  15. [connection signal="body_exited" from="." to="." method="_on_body_exited"]