44 lines
1.6 KiB
Text
44 lines
1.6 KiB
Text
[gd_scene load_steps=7 format=3 uid="uid://cusdydgg4b1bo"]
|
|
|
|
[ext_resource type="Script" uid="uid://b48mlxrnte625" path="res://braincell.gd" id="1_q1ksn"]
|
|
[ext_resource type="Texture2D" uid="uid://qyd5e7lb2esx" path="res://assets/braincell.png" id="2_wv6rk"]
|
|
[ext_resource type="PackedScene" uid="uid://c6ttpr5je1ly1" path="res://prefabs/mini_apple.tscn" id="3_wv6rk"]
|
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_g14j6"]
|
|
radius = 16.0
|
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_q1ksn"]
|
|
radius = 7.07107
|
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_wv6rk"]
|
|
radius = 16.0
|
|
|
|
[node name="Braincell" type="CharacterBody2D" node_paths=PackedStringArray("doorBox", "hand")]
|
|
z_index = 15
|
|
motion_mode = 1
|
|
script = ExtResource("1_q1ksn")
|
|
doorBox = NodePath("doorBox")
|
|
hand = NodePath("Hand")
|
|
|
|
[node name="Sprite2D" type="Sprite2D" parent="."]
|
|
texture = ExtResource("2_wv6rk")
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
shape = SubResource("CircleShape2D_g14j6")
|
|
|
|
[node name="doorBox" type="Area2D" parent="."]
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="doorBox"]
|
|
shape = SubResource("CircleShape2D_q1ksn")
|
|
|
|
[node name="Hand" type="Node2D" parent="."]
|
|
position = Vector2(0, -16)
|
|
|
|
[node name="MiniApple" parent="Hand" instance=ExtResource("3_wv6rk")]
|
|
|
|
[node name="PickupRange" type="Area2D" parent="." groups=["braincell"]]
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="PickupRange"]
|
|
shape = SubResource("CircleShape2D_wv6rk")
|
|
|
|
[connection signal="area_entered" from="doorBox" to="." method="_on_door_box_area_entered"]
|