This commit is contained in:
MaddoScientisto 2024-05-02 12:50:08 +02:00
commit 2b53936f8b
6 changed files with 54 additions and 7 deletions

View file

@ -1,6 +1,7 @@
[gd_scene load_steps=10 format=3 uid="uid://rp4jhx0tuh24"]
[gd_scene load_steps=12 format=3 uid="uid://rp4jhx0tuh24"]
[ext_resource type="Texture2D" uid="uid://cy5usvdeabi0t" path="res://Sprites/fragola.png" id="1_5wy11"]
[ext_resource type="Script" path="res://Scenes/fragola.cs" id="1_773fi"]
[sub_resource type="AtlasTexture" id="AtlasTexture_j6kkb"]
atlas = ExtResource("1_5wy11")
@ -63,11 +64,15 @@ animations = [{
[sub_resource type="CircleShape2D" id="CircleShape2D_bbnjh"]
radius = 7.0
[node name="Fragola" type="RigidBody2D"]
[sub_resource type="CircleShape2D" id="CircleShape2D_svktn"]
radius = 7.0
[node name="Fragola" type="RigidBody2D" groups=["enemies"]]
collision_layer = 4
collision_mask = 7
mass = 0.03
gravity_scale = 0.0
script = ExtResource("1_773fi")
metadata/_edit_group_ = true
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
@ -78,3 +83,11 @@ animation = &"idle"
shape = SubResource("CircleShape2D_bbnjh")
[node name="Fragola" type="Node2D" parent="."]
[node name="Area2D" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
shape = SubResource("CircleShape2D_svktn")
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
[connection signal="area_entered" from="Area2D" to="." method="_on_area_2d_area_entered"]