ft: wrapping manager overhaul

This commit is contained in:
2026-03-01 14:11:28 +01:00
parent 99de1fc113
commit f83b290f5c
24 changed files with 221 additions and 182 deletions

View File

@@ -7,9 +7,6 @@
[ext_resource type="Texture2D" uid="uid://dj4lyyloj1ke1" path="res://molecular/assets/food/food-left-bottom-bolt.png" id="5_i3g2v"]
[ext_resource type="Texture2D" uid="uid://cbynycukppmup" path="res://molecular/assets/food/food-right-bottom-bolt.png" id="6_07uaq"]
[sub_resource type="CircleShape2D" id="CircleShape2D_0vfbj"]
radius = 5.0
[sub_resource type="SpriteFrames" id="SpriteFrames_oo5vd"]
animations = [{
"frames": [{
@@ -51,28 +48,38 @@ animations = [{
"speed": 5.0
}]
[node name="FoodMol" type="Area2D" unique_id=595352294]
[sub_resource type="CircleShape2D" id="CircleShape2D_0vfbj"]
radius = 5.0
[node name="FoodMol" type="Node2D" unique_id=742430243]
script = ExtResource("1_0vfbj")
collision_layer = 8
collision_mask = 7
script = ExtResource("1_0vfbj")
val = null
food_name = null
flow_carry_speed = null
metadata/_custom_type_script = "uid://cayxffay17o0u"
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=762721134]
shape = SubResource("CircleShape2D_0vfbj")
[node name="Collision" type="Area2D" parent="." unique_id=927700818]
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=98693723]
visible = false
scale = Vector2(0.385, 0.385)
texture = ExtResource("2_68e2u")
[node name="WrappingManager" type="Node" parent="." unique_id=1406150436 node_paths=PackedStringArray("sprite", "shape")]
script = ExtResource("3_8lhj0")
sprite = NodePath("../AnimatedSprite2D")
shape = NodePath("../CollisionShape2D")
metadata/_custom_type_script = "uid://bvbc0n0pslq7p"
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=1856148995]
[node name="Sprite" type="AnimatedSprite2D" parent="Collision" unique_id=1856148995]
texture_filter = 1
sprite_frames = SubResource("SpriteFrames_oo5vd")
frame_progress = 0.9373464
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
[node name="Sprite2D" type="Sprite2D" parent="Collision" unique_id=98693723]
visible = false
scale = Vector2(0.385, 0.385)
texture = ExtResource("2_68e2u")
[node name="CollisionShape2D" type="CollisionShape2D" parent="Collision" unique_id=762721134]
shape = SubResource("CircleShape2D_0vfbj")
[node name="WrappingManager" type="Node" parent="." unique_id=1406150436 node_paths=PackedStringArray("sprite", "shape")]
script = ExtResource("3_8lhj0")
sprite = NodePath("../Collision/Sprite")
shape = NodePath("../Collision/CollisionShape2D")
dupFlags = 0
metadata/_custom_type_script = "uid://bvbc0n0pslq7p"
[connection signal="body_entered" from="Collision" to="." method="_on_body_entered"]